Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
orace rac taf

orace rac taf

Ratings: (0)|Views: 12 |Likes:
Published by Nst Tnagar

More info:

Published by: Nst Tnagar on Dec 04, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

02/04/2014

pdf

text

original

 
Oracle TAF
 
(TAF) is a feature of the
Java Database Connectivity (JDBC) Oracle Call Interface (OCI) driver 
.It enables the application to automatically reconnect to a database, if the database instance to whichthe connection is made fails. In this case, the active transactions roll back.(TAF) is a
client-side feature
that allows for clients to reconnect to surviving databases in the eventof a failure of a database instance. Notifications are used by the server to trigger TAF callbacks onthe client-side.TAF is configured using either client-side specified TNS connect string or using server-side serviceattributes. However, if both methods are used to configure TAF, the server-side service attributes willsupersede the client-side settings. The server-side service attributes are the preferred way to set upTAF.TAF can operate in one of two modes,
Session Failover 
and
Select Failover 
. Session Failover willrecreate lost connections and sessions. Select Failover will replay queries that were in progress.
VIEW :
 
 You can query
FAILOVER_TYPE
,
FAILOVER_METHOD
, and
FAILED_OVER 
columns inthe
V$SESSION
view to verify that TAF is correctly configured
.
When there is a failure, callback functions will be initiated on the client-side via OCI callbacks.This will work with standard OCI connections as well as Connection Pool and Session Poolconnections. Please see the OCI manual for more details on callbacks, Connection Pools, andSession Pools.
TAF Database Configurations
TAF works with the following database configurations to effectively mask a database failure:
 
Oracle Real Application Clusters
 
Replicated systems
 
Standby databases
 
Single instance Oracle database
Fast Connection Failover offers a driver-independent way for your Java DatabaseConnectivity (JDBC) application to take advantage of the connection failover facilities offered
 
by Oracle Database 10g. The Fast Connection Failover mechanism depends on the implicitconnection cache feature. As a result, for Fast Connection Failover to be available, implicitconnection caching must be enabled.
TAF is always active and does not have to be set, it does not work with the OCI ConnectionPool.
Oracle recommends not to use TAF and Fast Connection Failover in the sameapplication.
TAF Implementation:
Do not set the
GLOBAL_DBNAME
parameter in the
SID_LIST_ 
listener_name
section of the
listener.ora
. A statically configured global database name disables TAF.Depending on the 
FAILOVER_MODE
parameters, you can implement TAF in a number of ways.Oraclerecommends the following methods:
 
Example: TAF with Connect-Time Failover and Client Load Balancing
 
Example: TAF Retrying a Connection
 
Example: TAF Pre-Establishing a Connection
Example: TAF with Connect-Time Failover and Client Load Balancing
Implement TAF with connect-time failover and client load balancing for multiple addresses.In the following example, Oracle Net connects randomly to one of the protocol addresseson
sales1-server
or
sales2-server
. If the instance fails after the connection, the TAFapplication fails over to the other node's listener, reserving any
SELECT
statements inprogress.
sales.us.acme.com=(DESCRIPTION=(LOAD_BALANCE=on)(FAILOVER=on)(ADDRESS=(PROTOCOL=tcp)(HOST=sales1-server)(PORT=1521))(ADDRESS=
 
(PROTOCOL=tcp)(HOST=sales2-server)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=sales.us.acme.com)(FAILOVER_MODE=(TYPE=select)(METHOD=basic))))
Example: TAF Retrying a Connection
TAF also provides the ability to automatically retry connecting if the first connectionattempt fails with the
RETRIES
and
DELAY
parameters. In the following example, Oracle Nettries to reconnect to the listener on
sales1-server
. If the failover connection fails, OracleNet waits 15 seconds before trying to reconnect again. Oracle Net attempts to reconnect upto 20 times.
sales.us.acme.com=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sales1-server)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=sales.us.acme.com)(FAILOVER_MODE=(TYPE=select)(METHOD=basic)(RETRIES=20)(DELAY=15))))
Example: TAF Pre-Establishing a Connection
A backup connection can be pre-established. The initial and backup connections must beexplicitly specified. In the following example, clients that use net servicename
sales1.us.acme.com 
to connect to the listener on
sales1-server
are alsopreconnected to
sales2-server
. If
sales1-server
fails after the connection, Oracle Net failsover to
sales2-server
, preserving any
SELECT
statements in progress. Likewise, Oracle Netpreconnects to
sales1-server
for those clients that use
sales2.us.acme.com 
to connect tothe listener on
sales2-server
.
sales1.us.acme.com=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sales1-server)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=sales.us.acme.com)(INSTANCE_NAME=sales1)(FAILOVER_MODE=

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->