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)
)
)
)