Here is the example for connect string :
1. Using SCAN - Oracle 11gR2 :
Service1=(DESCRIPTION =
(LOAD_BALANCE = YES)
(ADDRESS = (PROTOCOL = TCP)(HOST = cluster01-scan)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = ADHOC) ) )
2.Using VIPs - (Oracle 10g & 11g) :
(DESCRIPTION =
(LOAD_BALANCE = YES)
(FAILOVER = ON)
(ADDRESS = (PROTOCOL = TCP)(HOST = testdb01-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = testdb02-vip)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = ADHOC)
(FAILOVER_MODE = (type = select) (method = basic) ) ) )
3.Thin JDBC :
url="jdbc:oracle:thin:@(DESCRIPTION= (LOAD_BALANCE = YES)
(ADDRESS = (PROTOCOL = TCP)(HOST = cluster01-scan)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = ADHOC) ) )
4.Thick JDBC
url="jdbc:oracle:oci:@ADHOC" (Add tnsnames.ora)
TAF Verifications :
select machine, failover_method, failover_type, failed_over, service_name, count(*)
from v$session GROUP BY machine, failover_method, failover_type, failed_over, service_name
1. Using SCAN - Oracle 11gR2 :
Service1=(DESCRIPTION =
(LOAD_BALANCE = YES)
(ADDRESS = (PROTOCOL = TCP)(HOST = cluster01-scan)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = ADHOC) ) )
2.Using VIPs - (Oracle 10g & 11g) :
(DESCRIPTION =
(LOAD_BALANCE = YES)
(FAILOVER = ON)
(ADDRESS = (PROTOCOL = TCP)(HOST = testdb01-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = testdb02-vip)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = ADHOC)
(FAILOVER_MODE = (type = select) (method = basic) ) ) )
3.Thin JDBC :
url="jdbc:oracle:thin:@(DESCRIPTION= (LOAD_BALANCE = YES)
(ADDRESS = (PROTOCOL = TCP)(HOST = cluster01-scan)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = ADHOC) ) )
4.Thick JDBC
url="jdbc:oracle:oci:@ADHOC" (Add tnsnames.ora)
TAF Verifications :
select machine, failover_method, failover_type, failed_over, service_name, count(*)
from v$session GROUP BY machine, failover_method, failover_type, failed_over, service_name
No comments:
Post a Comment