Oracle Real Application Cluster (RAC)
Oracle Real Application Cluster (RAC) supports both thin and OCI drivers.
The sample connection string for a thin driver is:
jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on) (ADDRESS=(PROTOCOL=TCP)(HOST=10.107.146.70) (PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=10.107.146.71) (PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=TIBQADB)))
Failover mode is supported with the basic and preconnect methods.
The sample connection string for an OCI driver is:
jdbc:oracle:oci:@net_service_name
When using an OCI driver, Transparent Application Failover (TAF) is supported.
You can configure Single Client Access Name (SCAN) for Oracle database in a cluster with numerous nodes. SCAN is a feature of Oracle Real Applications Clusters (RAC) 11g, which provides a single name for clients to access Oracle Databases running in a cluster. You can configure SCAN during the installation of Oracle Grid Infrastructure. Once configured, application tier connection descriptors specify the SCAN name instead of all the virtual hosts in the cluster.
You can specify the SCAN name as follows: VISION = (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=C-SCAN)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=VISION)))
For more information, see Oracle documentation.
For a thin driver, the sample SCAN connection string is as follows:
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=engrac-scan)(PORT=1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = TIBQADB)))
For an OCI driver, the sample SCAN connection string is as follows:
jdbc:oracle:oci:@TIBQADB
The sample TNSNames.ora file for the above URL is as follows:
TIBQADB = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = engrac-scan)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = TIBQADB) ) )