登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

li.angshan 的博客

关注数据计算领域

 
 
 

日志

 
 
 
 

RAC 10G TAF TEST NO1  

2009-10-29 12:07:06|  分类: oracle RAC技术 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

在默认rac安装完成后,数据库会生成根据数据库名称的tnsnames服务,但该服务目前在测试中并不能实现透明故障切换,
如:

[oracle@rac1 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.1/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

DEVDB2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip.wanmo.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = devdb)
      (INSTANCE_NAME = devdb2)
    )
  )

DEVDB1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.wanmo.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = devdb)
      (INSTANCE_NAME = devdb1)
    )
  )

DEVDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.wanmo.com)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip.wanmo.com)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = devdb)
    )
  )

LISTENERS_DEVDB =
  (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.wanmo.com)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip.wanmo.com)(PORT = 1521))
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )


切换前:
[oracle@rac1 ~]$
[oracle@rac1 ~]$ sqlplus system/oracle@devdb

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Oct 8 10:18:50 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL>
SQL>
SQL>
SQL> select instance_name from
  2  v$instance ;

INSTANCE_NAME
----------------
devdb2

SQL>
SQL>
SQL>
SQL> l
  1  select instance_name from
  2* v$instance
SQL> run
  1  select instance_name from
  2* v$instance

INSTANCE_NAME
----------------
devdb2

SQL> 
SQL>
SQL>
SQL>
SQL>
SQL>

切换:
[oracle@rac2 ~]$ echo $ORACLE_SID
devdb2
[oracle@rac2 ~]$ sqlplus '/ as sysdba '

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Oct 8 09:58:53 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> shutdown abort
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  167772160 bytes
Fixed Size                  1218316 bytes
Variable Size              96471284 bytes
Database Buffers           67108864 bytes
Redo Buffers                2973696 bytes
Database mounted.
Database opened.
SQL> shutdown abort
ORACLE instance shut down.
SQL>

切换后:

SQL>
SQL>
SQL> run
  1  select instance_name from
  2* v$instance
select instance_name from
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel


SQL>
  评论这张
 
阅读(159)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018