应用程序连接Oracle rac的URL写法

Oracle RAC 集群示意图
RAC,全称real application clusters,译为“实时应用集群”, 是Oracle新版数据库中采用的一项新技术,

 是高可用性的一种,也是Oracle数据库支持网格计算环境的核心技术。

应用程序连接Oracle rac的URL写法一例 :

jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = dc1.bpsb.com.cn)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = dc2.bpsb.com.cn)(PORT = 1521))(LOAD_BALANCE = yes)(FAILOVER = on))(CONNECT_DATA =(SERVICE_NAME = bpscrac)))

这是网络上的一段oracle rac的url连接以及客户端tnsnames.ora的示例----与Oracle RAC相关的连接配置写法实例:(地址--http://www.linuxidc.com/Linux/2010-08/27947.htm)

1. 应用程序连接Oracle rac的URL写法
jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.30.52)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.30.51)(PORT = 1521))(LOAD_BALANCE = yes)(FAILOVER = yes)(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = kms)(FAILOVER_MODE=(TYPE = SELECT)(METHOD = BASIC)(RETIRES = 180)(DELAY = 15))))
 

2. 客户端连接Oracle rac时的tnsnames.ora写法
ZJGLDB2 =

  (DESCRIPTION =

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

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = kms)

      (INSTANCE_NAME = kms2)

    )

  )

 

ZJGLDB1 =

  (DESCRIPTION =

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

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = kms)

      (INSTANCE_NAME = kms1)

    )

  )

 

LISTENERS_KMS =

  (ADDRESS_LIST =

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

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

  )

 

KMS =

  (DESCRIPTION =

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

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

    (LOAD_BALANCE = yes)

    (FAILOVER = yes)

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = kms)

      (FAILOVER_MODE =

        (TYPE = SELECT)

        (METHOD = BASIC)

        (RETRIES = 180)

        (DELAY = 5)

      )

    )

  )

你可能感兴趣的:(oracle,server,tcp,service,url,basic)