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

Free Oracle Tips

HTML Text

 Home
 E-mail Us
 Oracle Articles


 Oracle Training
 Oracle News

 Oracle Forum
 Class Catalog


 Our Staff
 Our Prices
 Help Wanted!

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


 SQL Tuning
 Security

 UNIX
 Oracle UNIX
 Linux
 Oracle Linux
 Monitoring
 Remote help

 Remote plans
 Remote
services
 Oracle C++
 Oracle Java
 Apache
 JDeveloper
 App Server

 Applications
 Oracle Forms
 Oracle Portal
 11i Upgrades
 SQL Server
 Oracle Concepts
 HTML-DB Tips
 Software Help

 Remote Help  
 Development  

 Implementation


 Financials Training
 Oracle 11i
 Oracle Apps 11i
 Oracle Workflow
 Oracle AR 11i Class
 Oracle AP 11i class
 Oracle GL 11i class
 Oracle HR 11i class
 Oracle FA 11i class
 11i Project Mgt
 11i procurement
 11i collections


 Oracle Posters
 Oracle Books

 Oracle Tuning Book
 Oracle RAC Book
 Oracle Security
 Easy Oracle Books
 Oracle Scripts
 SQL Server DBA
 SQL Design Patterns
 Ion
 Excel-DB   


 BC Oracle News


 Rednecks!
 Dress code
 Arabian Stallion

 Burleson Arabians
 Guide Horses
 Don Burleson Blog
 Golf & Travel


 Privacy Policy
 

 

 

 

 

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 cruise
 
 
 
Oracle performance tuning software
 
 

Oracle performance tuning book

 

 
 
 
Oracle performance Tuning 10g reference poster
 
 
 
Oracle training in Linux commands
 
Oracle training Excel
 
Oracle training & performance tuning books
 

 

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 -  2009 by Burleson Enterprises, Inc. All rights reserved.

Oracle © is the registered trademark of Oracle Corporation.