客户端连接oracle集群数据库的配置

一、通过SCAN(Single Client Access Name)访问集群数据库 

  1、在DNS中配置SCAN的A记录,并作轮询设置:

       CMD:C:\NSLOOKUP SCAN.ORA11G

               SERVER:    UnKnown

Address:    DNSIP

               NAME:    SCAN.ORA11G

               Adress:    SCANIP1

                              SCANIP2

                              SCANIP3

  配置客户端本地网络服务:

   ORA11GDB =

     (DESCRIPTION =

       (ADDRESS_LIST =

         (ADDRESS = (PROTOCOL =TCP)(HOST = SCAN.ORA11G)(PORT = 1521))

       )

       (CONNECT_DATA =

         (SERVICE_NAME = ORA11GDB)

       )

     )

 sqlplus连接测试:

C:\sqlplus system@ora11gdb

SQL>select instance_name from v$instance;

 2、如果没有配置DNS,可以通过客户端配置指向所有的SCAN IP,并打开Load_banlance参数,可以实现客户端管理的连接的负载均衡

配置客户端本地网络服务:

  ORA11GDB =

     (DESCRIPTION =

       (ADDRESS_LIST =

         (ADDRESS = (PROTOCOL =TCP)(HOST = SCANIP1)(PORT = 1521))

         (ADDRESS = (PROTOCOL =TCP)(HOST = SCANIP2)(PORT = 1521))

         (ADDRESS = (PROTOCOL =TCP)(HOST = SCANIP3)(PORT = 1521))

       )

       (LOAD_BALANCE = YES)  

       (CONNECT_DATA =

         (SERVICE_NAME = ORA11GDB)

       )

     )

二、通过直接指向实例所在主机的PublicIP、VirtualIP也可以访问数据库

   RACDB_IP =

     (DESCRIPTION =

       (ADDRESS_LIST =

          (ADDRESS = (PROTOCOL =TCP)(HOST = NODE1.PUBLICIP)(PORT = 1521))

(ADDRESS = (PROTOCOL =TCP)(HOST = NODE2.PUBLICIP)(PORT = 1521))

(ADDRESS = (PROTOCOL =TCP)(HOST = NODE1.VIPIP)(PORT = 1521))

(ADDRESS = (PROTOCOL =TCP)(HOST = NODE2.VIPIP)(PORT = 1521))

        ) (LOAD_BALANCE = YES)  

        (CONNECT_DATA =

          (SERVICE_NAME = ORA11GDB)

        )

      )


你可能感兴趣的:(oracle)