没有简介就是最好的简介
分类: Oracle
2017-03-14 16:55:27
When Oracle Net Services establishes a connection to an instance, the connection remains open until the client closes the connection, the instance is shutdown, or a failure occurs. If you configure transparent application failover (TAF) for the connection, then Oracle Database moves the session to a surviving instance when an outage occurs.
TAF can restart a query after failover has completed but for other types of transactions, such as INSERT, UPDATE, or DELETE, the application must rollback the failed transaction and resubmit the transaction. You must also reexecute any session customizations, in other words, ALTER SESSION statements, after failover has occurred. However, with TAF, a connection is not moved during normal processing, even if the workload changes over time.
Services simplify the deployment of TAF. You can define a TAF policy for a service, and all connections using this service will automatically have TAF enabled. This does not require any client-side changes. The TAF setting on a service overrides any TAF setting in the client connection definition.
To define a TAF policy for a service, use SRVCTL as in the following example, where the service name is tafconn.example.com and the database name is CRM:
$ srvctl modify service -d crm -s tafconn.example.com -P BASIC -e SELECT -z 5 -w 120
You can also specify a single transparent application failover (TAF) policy for all users of a service by defining the FAILOVER_METHOD (-m option), FAILOVER_TYPE (-e option). The TAF policy can also define the number of times that a failed session attempts to reconnect to the service (-z option) and how long it should wait between reconnection attempts (-w option).
Oracle Call Interface applications with TAF enabled should use FAN high availability events for fast connection failover.