Can the JDBC Thin Driver Do Failover by Specifying FAILOVER_MODE?

zhanglei_itput發表於2011-04-02
Can the JDBC Thin Driver Do Failover by Specifying FAILOVER_MODE?
  : 465423.1 型別: HOWTO
  上次修訂日期: 27-APR-2009 狀態: PUBLISHED

In this Document
  
  
  


Applies to:

JDBC - Version: 10.2 to 11.1
Information in this document applies to any platform.

Goal

You have a 2-node RAC database. You ask if the JDBC Thin driver can do failover when using the following connect information.

jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = rac1vip)(PORT = 1525)) (ADDRESS = (PROTOCOL = TCP)(HOST = rac2vip)(PORT = 1525)) (LOAD_BALANCE = on)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ractest) (FAILOVER_MODE = (TYPE = SELECT) (METHOD = BASIC) (RETRIES = 2) (DELAY = 1))))

Solution

No. JDBC Thin cannot use FAILOVER_MODE. The failover defined by FAILOVER_MODE is Transparent Application Failover (TAF). JDBC Thin does not support TAF.
However JDBC Thin does support Fast Connection Failover (FCF).

Some references are:

[1]
The "Is failover supported?" question in the JDBC Frequently Asked Questions (FAQ)
at

[2]
Oracle Database JDBC Developer's Guide and Reference, 10g Release 2 (10.2)
at Chapter 27 Fast Connection Failover
Chapter 28 Transparent Application Failover

[3]
How To Verify And Test Fast Connection Failover Setup From a JDBC Thin Client

[4]
The "Oracle Real Application Clusters Sample Code" page
at
link: **UPDATED** Step by Step Guide and Test Program for JDBC FCF [Nov 2006]
A step-by-step guide to help you set up Fast Connection Failover with JDBC. It also includes a
simple JDBC program that can be used to test your configuration and a sample java program to
subscribe to FAN events for troubleshooting your configuration.

References

- How To Verify And Test Fast Connection Failover (FCF) Setup From a JDBC Thin Client

Keywords

RAC; FAILOVER_MODE; JDBC~THIN;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9252210/viewspace-691541/,如需轉載,請註明出處,否則將追究法律責任。

相關文章