For RAC, when an Oracle Instance fails, the application has several high-availability technologies to ensure availability. These technologies are transparent to the client, and the client may not be able to perceive the instance failure.
1. Transparent Application Failover (TAF)
Ii. Fast Connection Failover (FCF ).
When a node fails, TAF allows the database session to use OCI libraries for fail over to another surviving node. However, if the application uses JDBC thin driver, TAF cannot be used.
Failover Modes:
Session failover
Select failover
None (default)
1. select mode allows the query to be executed on the new node again, discard the rows that have been fetch, and continue to return the results to the client.
2. The none mode explicit declaration does not use TAF
3. TAF cannot restore any DML transaction, and the transaction will be rolled back on another node.
Failover Methods:
Basic
Preconnect
1. the Basic option means that the client creates a new connection after the instance fails. This method may cause the performance of the other node to degrade when the node fails, because many sessions will be reconnected to the surviving nodes.
2. The client generates a preconnected session as a backup to accelerate failover when the instance fails.
TAF is the client-side feature. We need to configure it in the client Tnsnames. ora or server through service.
1. Client implementation
In RAC, the typical configurations in tnsnames. ora are as follows:
- LEO1=
- (DESCRIPTION_LIST=
- (LOAD_BALANCE=Off)
- (FAILOVER=On)
- (DESCRIPTION=
- (ADDRESS_LIST=
- (LOAD_BALANCE=OFF)
- (FAILOVER=ON)
- (ADDRESS= (PROTOCOL=TCP)(HOST=Node1.Chinamobile.com )(PORT=1521))
- )
- (CONNECT_DATA=
- (SERVICE_NAME=Leo)
- (INSTANCE_NAME=Leo1)
- (FAILOVER_MODE= (TYPE=Session)(METHOD=Basic)(RETRIES=4)(DELAY=1))
- )
- )
- (DESCRIPTION=
- (ADDRESS_LIST=
- (LOAD_BALANCE=OFF)
- (FAILOVER=ON)
- (ADDRESS= (PROTOCOL=TCP)(HOST=Node2.Chinamobile.com )(PORT=1521))
- )
- (CONNECT_DATA=
- (SERVICE_NAME=Leo)
- (INSTANCE_NAME=Leo2)
- (FAILOVER_MODE= (TYPE=Session)(METHOD=Basic)(RETRIES=4)(DELAY=1))
- )
- )
- )
2. server implementation
- Srvctl add service-d leo-s cmcc-q TRUE-p basic-e SESSION-z 4-w 5 specific usage parameters are as follows:
- Usage: srvctl add service-d<Db_unique_name>-S<Service_name>{-R"<Preferred_list>"[-"<Available_list>"] [-P {BASIC | NONE | PRECONNECT}]
- |-G<Pool_name>[-C {UNIFORM | SINGLETON}]} [-k<Net_num>] [-L [PRIMARY] [, PHYSICAL_STANDBY] [, LOGICAL_STANDBY] [, SNAPSHOT_STANDBY]
- [-Y {AUTOMATIC | MANUAL}] [-q {TRUE | FALSE}] [-x {TRUE | FALSE}] [-j {SHORT | LONG}] [-B {NONE | SERVICE_TIME | THROUGHPUT}]
- [-E {NONE | SESSION | SELECT}] [-m {NONE | BASIC}] [-z<Failover_retries>] [-W<Failover_delay>] [-T<Edition>] [-F]
- -D<Db_unique_name>Unique name for the database
- -S<Service>Service name
- -R"<Preferred_list>"Comma separated list of preferred instances
- -"<Available_list>"Comma separated list of available instances
- -G<Pool_name>Server pool name
- -C {UNIFORM | SINGLETON} Service runs on every active server in the server pool hosting this service (UNIFORM) or just one server (SINGLETON)
- -K<Net_num>Network number (default number is 1)
- -P {NONE | BASIC | PRECONNECT} TAF policy specification
- -L<Role>Role of the service (primary, physical_standby, logical_standby, snapshot_standby)
- -Y<Policy>Management policy for the service (AUTOMATIC or MANUAL)
- -E<FailoverType>Failover type (NONE, SESSION, or SELECT)
- -M<FailoverMethod>Failover method (NONE or BASIC)
- -W<Integer>Failover delay
- -Z<Integer>Failover retries
- -T<Edition>Edition (or "" for empty edition value)
- -J<Clb_goal>Connection Load Balancing Goal (SHORT or LONG). Default is LONG.
- -B<RuntimeLoad Balancing Goal>Runtime Load Balancing Goal (SERVICE_TIME, THROUGHPUT, or NONE)
- -X<DistributedTransaction Processing>Distributed Transaction Processing (TRUE or FALSE)
- -Q<AQHA specifications>Aq ha configurations (TRUE or FALSE)
- Usage: srvctl add service-d<Db_unique_name>-S<Service_name>-U {-r"<New_pref_inst>"|-"<New_avail_inst>"} [-F]
- -D<Db_unique_name>Unique name for the database
- -S<Service>Service name
- -U Add a new instance to service configuration
- -R<New_pref_inst>Name of new preferred instance
- -<New_avail_inst>Name of new available instance
- -F Force the add operation even though a listener is not configured for a network
- -H Print usage
- Fast Connection Failover and Fast Application Notification
FAN is a message publishing mechanism that publishes messages to the client at instance up/down to reconfigure the cluster. FCF is transparent through FAN.
Instance failure failover.
Client drivers supported by FCF:
Java Database Connection Driver (JDBC)
Oracle Universal Connection Pool UCP
Clients using the Oracle Call Interface
Oracle Data Providers for. Net
When the db_domain parameter is set in 11R2 (11.2.0.1), FCF will be invalid, bug: 8779597
For more information about Oracle, see Oracle topics page http://www.bkjia.com/topicnews.aspx? Tid = 12