ITPub博客

首页 > Linux操作系统 > Linux操作系统 > RAC客户端连接测试

RAC客户端连接测试

原创 Linux操作系统 作者:jifei0611 时间:2010-11-05 15:34:19 0 删除 编辑

客户端环境: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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-01-12

  • 博文量
    143
  • 访问量
    273350