An example of a JDBC URL, unsing JDBC thin driver
jdbc:oracle:thin:@
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = host1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = host2-vip)(PORT = 1521))
(LOAD_BALANCE = on)
(FAILOVER = on)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = db-service)
)
)
Load Balance will ensure that the clinet will do a round robin choose of ip address.
Failover will ensure that the other ip is tried if the first one failes.
No comments:
Post a Comment