To Bottom |
In this Document
APPLIES TO:JDBC - Version 11.2.0.1.0 and laterUniversal Connection Pool - Version 11.1.0.7.0 and later Information in this document applies to any platform. PURPOSEAnswers to common questions on failover using Oracle JDBC driver This FAQ covers only Java programs (clients) connecting via JDBC driver. This does not cover failover with other clients such as SQL*Plus, etc.
QUESTIONS AND ANSWERS
What are the different types of failover mechanisms available ?JDBC-THIN driver supports Fast Connection Failover (FCF)
Can I use FCF and TAF together ?No. Only one of them should be used at a time.
Is FCF provided by Oracle JDBC 9i drivers ?No. FCF is built on the pooling feature known as 'Implicit Connection Caching' and this is available only with JDBC 10g or higher versions.
We have been told by Oracle that FCF is not available when using XA JDBC drivers. What HA options are available to us should we wish to use XA?In 10g JDBC, the driver-embedded connection pool (ICC) cannot pool XA connections i.e., XAConnection objects. FCF only works for cached connections from OracleDataSource.
Additional Reading:
How do we configure SOA Suite (a simple EE5 application) so that planned and unplanned outages have no impact on applications and that transactions are transparently failed over?For Planned Outages: FCF DOES NOT SUPPORT PLANNED OUTAGES LIKE SERVICE RELOCATION (Doc ID 1076130.1) Fast Connection Failover does not support planned outages like a service relocation. It is designed to work for unplanned outages, where a RAC service is preferred on all the nodes in the cluster and one of the nodes goes down unexpectedly. When a planned outage like a service relocation is done from one node to the other, FCF does not work as expected and the result is unpredictable. For Un-Planned Outages: See following documentation:
Are there any special database setup configurations that we need to take into consideration when using XA and HA together?In general, when doing XA with a RAC database, you need to use affinity to control on which node you're connected to. In short, you want to ensure that given a global transaction, all the work goes to a single database instance. You can refer to this old but still interesting Technical Brief: To add to the above information, it should be noted that starting in RDBMS 11gR1, transaction branches can go to different instances even though there could be a potential performance cost (for row locking synchronization, etc.). Before 11gR1, all transaction branches had to the same instance.
How do we write EE5 code that makes use of SessionBeans, EntityBeans and PersistentManager so that we can provide HA. I have seen examples of FCF and JDBC code that issues a retry when receiving a SQLException. When using EE5 you do not write your code to use JDBC. What options are available to us?It is up to the J2EE container or the servlet implementor to retry when an exception occurs. This is not done in the JDBC-THIN driver (FCF).
What is SCAN ? Which version of JDBC supports SCAN ?SCAN or Single Client Access Name is a new Oracle Real Application Clusters (RAC) 11g Release 2 feature that provides a single name for clients to access an Oracle Database running in a cluster. The benefit is clients using SCAN do not need to change if you add or remove nodes in the cluster. Having a single name to access the cluster allows clients to use the EZConnect client and the simple JDBC thin URL to access any database running in the clusters independently of which server(s) in the cluster the database is active. SCAN provides load balancing and failover of client connections to the database. The SCAN works as an IP alias for the cluster. A typical JDBC URL using SCAN would look like: jdbc:oracle:thin:@sales1-scan:1521/oltp Additional Reading: http://www.oracle.com/technetwork/database/clustering/overview/scan-129069.pdf SCAN feature is supported only from JDBC version 11.2.0.1. This was one of the features added to 11.2 as a part of "IPv6 support".
|