RE: RAC failover and JDBC string

From: Bobak, Mark <>
Date: Thu, 14 Aug 2008 10:16:10 -0400
Message-ID: <>

Hi John,

I assume you're talking JDBC thin client, since w/ thick, you just use a load-balancing/failover connect string.

I also assume you're using a JDBC thin URL that looks something like this: jdbc:oracle:thin:@rac01:1521/pqprd

So, the above will connect to rac01 node every time, and will not help w/ load balancing and failover. If rac01 crashes, my app is dead in the water.

However, you can do something like this w/ JDBC: Jdbc:oracle:thin@ (DESCRIPTION =(LOAD_BALANCE=on)(FAILOVER=on) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = rac01-vip)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = rac02-vip)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = rac03-vip)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = pqprd)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC))))

In other words, you can embed the entire load balancing, failover enabled connect string into your JDBC thin url.

Hope that helps,



Mark J. Bobak
Senior Database Administrator, System & Product Technologies ProQuest
789 E. Eisenhower, Parkway, P.O. Box 1346 Ann Arbor MI 48106-1346
+1.734.997.4059 or +1.800.521.0600 x 4059<><><>

ProQuest...Start here.

From: [] On Behalf Of John Dunn Sent: Thursday, August 14, 2008 5:32 AM
To: oracle-l
Subject: RAC failover and JDBC string

I need to understand how RAC handles hostnames in JDBC connection strings.

If I have an application that uses a JDBC connection string(that contains a hostname) to connect to the Oracle database, what happens if there is a failover to another server in the RAC cluster?

-- Received on Thu Aug 14 2008 - 09:16:10 CDT

Original text of this message