=====Transparent Application Failover konfigurieren===== **TAF** is a client-side feature that allows clients to reconnect to surviving databases in the event of a failure of a database instance. Notifications are used by the server to trigger TAF callbacks on the client-side. See: http://docs.oracle.com/cd/E11882_01/network.112/e10836/advcfg.htm#NETAG338 Transparent Application Failover (TAF) or simply Application Failover is a feature of the OCI driver. It enables you to automatically reconnect to a database if the database instance to which the connection is made goes down. In this case, the active transactions roll back. A transaction rollback restores the last committed transaction. The new database connection, though created by a different node, is identical to the original. This is true regardless of how the connection was lost. TAF is always active and does not have to be set. TAF cannot be used with thin driver. **FCF** Fast Connection Failover (FCF) – Server Side FCF provides is very fast notification of the failure and the ability to reconnect immediately using the same URL. When a RAC node fails the application will receive an exception. The application has to handle the exception and reconnect. See http://docs.oracle.com/cd/E11882_01/server.112/e10803/config_fcf.htm#HABPT4967 See also this node: * Understanding Transparent Application Failover (TAF) and Fast Connection Failover (FCF) (Doc ID 334471.1) ==== TAF Connect string konfigurieren ==== Im Beipiel wird ein zweiter Connectstring angegeben, Parameter BACKUP der beim Fehler für das Umschalten verwendet wird. Beipiel: GPI_TAF = (DESCRIPTION= (ADDRESS=(PROTOCOL=TCP)(HOST=gpidb01.pipperr.local)(PORT = 1521)) (FAILOVER = on) (LOAD_BALANCE = yes) (CONNECT_DATA = (SERVICE_NAME = S_SIEBEL_DE_SB) (FAILOVER_MODE = (TYPE = SELECT) (METHOD = BASIC) (BACKUP = GPI_VIP_SRV) (RETRIES = 60) (DELAY = 10) ) ) ) **Adress Parameter: ** ^Parameter^Beschreibung^ |FAILOVER=on |Jede Adresse nacheinander ausprobieren, bis eine Verbindung funktioniert| |LOAD_BALANCE=on \\ FAILOVER=on|Jede Adresse zufällig verwenden, bis eine Verbindung funktioniert | |LOAD_BALANCE=on |Eine Adresse zufällig verwenden,.| |SOURCE_ROUTE=on | Jede Adresse verwenden um das Ziel zu erreichen, Stichwort Connectin Manager| |LOAD_BALANCE=off \\ FAILOVER=off \\ SOURCE_ROUTE=off |Nur die erste Adresse verwenden| **FAILOVER_MODE Parameter:** ^Parameter^Wert^ |BACKUP|Weitere möglicher Connect String nach einem Fehler - muss angegeben werden falls preconnect verwendet wird| |DELAY |Zeit in Secunden zwischen Verbindungsversuchen, falls RETRIES angeben ist der Wert immer eine Sekunde| |METHOD|**basic** => Verbindung wird zum Failover Zeitpunkt aufgebaut - **preconnect** => Breits beim Start wird eine Backup Verbindung aufgebaut| |RETRIES|Anzahl der Versuche einen Connect nach einem Failover aufzubauen - falls DELAY angeben => wird der Wert auf 5 Versuche gesetzt falls nicht anders angegeben| |TYPE| Failover type: **session** => Ganze Session wird umgezogen, neuer Call Stack wird aufgebaut - **select** => offene Cursur werden neu aufgebaut - etwas Overhead auf Client Seite - **none** => kein Failover| ==== Verbindungen pürfen ==== select inst_id , machine , username , failover_type , failover_method , failed_over , count(*) as connect_count from gv$session where username is not null group by inst_id,machine, username,failover_type, failover_method, failed_over order by machine / ==== Quellen ==== Oracle: * http://docs.oracle.com/cd/E11882_01/network.112/e10836/advcfg.htm#NETAG339 * How To Set Up Oracle RAC for Siebel Applications (Doc ID 473859.1))