Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 

 

Using OCI Driver

Oracle RAC Cluster Tips by Burleson Consulting

This is an excerpt from the bestselling book Oracle Grid & Real Application Clusters.  To get immediate access to the code depot of working RAC scripts, buy it directly from the publisher and save more than 30%.


Since the RAC system is a multi-instance single database, whenever one of the instances has failed, all the client connections to the failed instance receive error. They can, however, reconnect to the surviving instance on a different node. Applications can also use a callback function through an OCI call to notify clients or users of the failover or control and mask the failover behavior.

TAF enables the application to automatically reconnect to the database if the database instance to which the connection is made goes down. After the reconfiguration of the failed instance is completed, and when the database is available, the user session is re-authenticated and the open cursors are either re-executed (failover_mode=SESSION) or can continue fetching (failover_mode=SELECT). When TAF is utilized, a new connection to the database is automatically obtained by Oracle. This allows users to continue working as if the original connection had never failed.

TAF functionality is achieved through the use of the Oracle provided client side network libraries, the Oracle call interface (OCI). The client needs to use the Oracle Net OCI libraries to take advantage of TAF. With OCI callback functions, OCI API applications can monitor the failure status of the Oracle Instance.

There are seven possible failover events in the OCI API that can be captured in the application code.  They are

* FO_BEGIN = 1 is used to indicate that a lost connection has been detected during and a fail over is starting.

* FO_END = 2 is used to indicate that a successful fail over occurred.

* FO_ABORT = 3 is used to indicate that a fail over was not successful and there is no retry option.

* FO_REAUTH = 4 is used to indicate that a users handle has been re-authenticated.

* FO_ERROR = 5 is used to indicate that a fail over was temporarily unsuccessful.  This gives the application the opportunity to fail gracefully or to retry fail over. This retry is usually done by issuing a SLEEP() and then retry by returning the value FO_RETRY

* FO_RETRY = 6 is used to tell OCI to retry failover

* FO_EVENT_UNKNOWN = 7 is used to indicate a bad failover event

To implement TAF in Real Application Clusters, Client Applications need to use the JDBC OCI instead of PL/SQL packages. While RAC supports both thin JDBC and JDBC OCI, TAF is only supported with JDBC OCI.

Oracle TechNet can provide a sample as how to use the TAF using OCI driver.  The link is:

http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/10g_jdbc/
OCIdriverTAFSample/OCIdriverTAFSample.java.html   

 


This is an excerpt from the bestselling book Oracle Grid & Real Application Clusters, Rampant TechPress, by Mike Ault and Madhu Tumma.

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.

http://www.rampant-books.com/book_2004_1_10g_grid.htm


 

 
��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational