Configuring failover in the Oracle RAC environment

To provide the failover capabilities in an Oracle RAC environment, you must configure the Oracle connection string in the ECDA Option for Oracle tnsnames.ora file to use Oracle TAF.

To enable failover, you enter multiple virtual listener addresses in the tnsnames.ora file for the RAC database configuration. The first address is used for the initial connection. As shown in the following code segment, when a failure occurs, the connections between the ECDA Option for Oracle and the Oracle database will try to reconnect to the subsequent virtual listener address entries (shown in bold typeface) until a connection is successful.

RACDB=
 (DESCRIPTION=
  (ADDRESS =(PROTOCOL = TCP)(HOST = host1)(PORT = 1521))
  (ADDRESS =(PROTOCOL = TCP)(HOST = host2)(PORT = 1521))
  (ADDRESS =(PROTOCOL = TCP)(HOST = host3)(PORT = 1521))
  (ADDRESS =(PROTOCOL = TCP)(HOST = host4)(PORT = 1521))
 )

In addition, you must add the FAILOVER_MODE section to the Oracle connection string. It has two configuration parameters that define the failover characteristics for a connection:

This code segment shows the two recommended FAILOVER_MODE options in bold typeface:

(CONNECT_DATA =
 (SERVER = DEDICATED)
 (SERVICE_NAME = racdb.sybase.com)
 (FAILOVER_MODE =
  (TYPE = SELECT)
  (METHOD = BASIC)
 )
)

This code segment shows the example Oracle connection string combined in the tnsnames.ora file with all of the configuration parameters (in bold typeface) set to enable failover:

RACDB=
 (DESCRIPTION=
  (ADDRESS =(PROTOCOL = TCP)(HOST = host1)(PORT = 1521))
  (ADDRESS =(PROTOCOL = TCP)(HOST = host2)(PORT = 1521))
  (ADDRESS =(PROTOCOL = TCP)(HOST = host3)(PORT = 1521))
  (ADDRESS =(PROTOCOL = TCP)(HOST = host4)(PORT = 1521))
  (CONNECT_DATA =
   (SERVER = DEDICATED)
   (SERVICE_NAME = racdb.sybase.com)
   (FAILOVER_MODE =
    (TYPE = SELECT)
    (METHOD = BASIC)
   )
  )
 )