Mar 022006
 

Apparently the Oracle JDBC driver supports fail over based on connection creation. I think it will support tnsnames parsing, but I’m not sure. This is supported though:

jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)
(HOST=example.com)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)
(HOST=failover.example.com)(PORT=1521))
(FAILOVER=true)(LOAD_BALANCE=false)
(CONNECT_DATA=(SERVER=DEDICATED)(SID=foo)))

Not the nicest format, but you only have to do it once and it seems to work pretty well.

  3 Responses to “Fail over in the Oracle JDBC driver”

  1. Great share but i have a question about failover definition.

    What will i have to define when i want to describe 2 different SID for failover case ???
    In your example there is only one SID (SID=foo)

    Best Regards,

    Alper.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">