Application failover to the correct Oracle DB instance (Data Guard, not RAC cluster)

Using an Oracle Data Guard with a Primary and Standby database instance, is there a way to use a JDBC driver to send to the correct DB instance (or more specifically, to allow the application to fail over to the Standby  database instance if the primary is down)

I examined the documentation and the JDBC drivers appear to be for a RAC cluster as opposed to the Data Guard Primary and Standby

Can some one please help clarify ?

Who is Participating?
slightwv (䄆 Netminder) Commented:
I'm not a Data Guard Expert in that I don't know everything there is to know about it.

What are you tying to get out of "application to fail over"?  Do you want queries to continue, DML to eventually commit, etc. (Transparent Application Failover - TAF) or just current connections to stop and reconnect/start over on the standby?

With JDBC there appears to be something called  Fast Connection Failover (FCF).  In some quick reading there appears to be some extra setup and system engineering to get it all working.

Seamless Application Failover with Oracle Data Guard

Client Failover Best Practices for Highly Available Oracle Databases Oracle Database 12c
A fail over or switch over will bring the standby db online and become the primary db and application should reconnect.
The standby db is only available to the Primary DB in a DataGuard cluster.

See Oracle link on failover and switch over:

Data Guard broker:
Geert GOracle dbaCommented:
a standby isn't active
by default you can't connect to it

with dataguard, you could setup the option to open the standby database read only at certain times
this if for running reports, and other read only items

don't consider the standby as an active component in your databases
it's sleeping
NCSU44Author Commented:
Yes, I understand in Data Guard, the Primary is active and the Standby is passive until there is a failover on the database side

There are two failovers

1> the database failover:  when the Primary fails over to the Standby

2> the application failover to the correct DB instance

What I am asking about is 2> application failover

In an application failover, do you have to rely upon a GSLB to reroute the traffic to the currently active instance, or can you use a JDBC driver or other driver on the application end ?

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.