How to Set JDBC Thin 10g Connection String to RAC Without Referencing Every Node in the Cluster (Doc ID 414465.1)

Last updated on MARCH 21, 2016

Applies to:

JDBC - Version 10.1.0.5 to 10.2.0.5 [Release 10.1 to 10.2]
Information in this document applies to any platform.
***Checked for relevance on 09-Nov-2012***


Goal

Is there a way to specify the JDBC connection string to a RAC 10g database cluster without
referring to every single node in the cluster?

This is a problem because of the overhead of reconfiguring every node that accesses the cluster
each time the member nodes of the cluster change.

The current string used is as follows:

jdbc:oracle:thin:@(DESCRIPTION=
(LOAD_BALANCE=off)
(ADDRESS=(PROTOCOL=TCP)(HOST=db7-vip)(PORT=1521))
(ADDRESS=(PROTOCOL =TCP)(HOST=db6-vip)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=db5-vip)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=<service_name>)))


Note that the VIPs (Virtual IPs) for the 3 nodes are referenced explicitly in the connection string.


Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms