RAC客户端连接测试

客户端环境:OS:Windows 2003 + ORACLE 10G

 

1.      C:\WINDOWS\system32\drivers\etc\hosts加入下面内容:

10.182.4.31     rac1

10.182.4.35     rac2

 

#Virtual

10.182.4.33   rac1-vip

10.182.4.37   rac2-vip

 

2.      tnsnames.ora文件中加入下面的内容:

OAKDB =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))

    (ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))

    (LOAD_BALANCE = yes)

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = oakdb)

      (FAILOVER_MODE =

        (TYPE = session)

        (METHOD = basic)

        (RETIES = 180)

        (DELAY = 5)

      )

    )

  )

3.连接测试

C:\>sqlplus system/password@oakdb

 

SQL*Plus: Release 10.2.0.1.0 - Production on 星期五 11 5 10:40:56 2010

 

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

 

 

联机到:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, Real Application Clusters, OLAP and Data Mining options

 

SQL> select instance_name from v$instance;

 

INSTANCE_NAME

--------------------------------

oakdb2

 

SQL> exit

已切断与 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, Real Application Clusters, OLAP and Data Mining options 的联机

 

C:\>sqlplus system/password@oakdb

 

SQL*Plus: Release 10.2.0.1.0 - Production on 星期五 11 5 10:41:27 2010

 

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

 

 

联机到:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, Real Application Clusters, OLAP and Data Mining options

 

SQL> select instance_name from v$instance;

 

INSTANCE_NAME

--------------------------------

oakdb1

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7419833/viewspace-677570/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7419833/viewspace-677570/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值