In Oracle : Oracle Database Failover and Switchover

Oracle Applications EBS 11i, R12      Oracle Database      Data Warehouse & BI      Oracle Middleware      PL/SQL      Linux ...

Oracle DBA

Real Application Cluster (RAC) Maintenance tasks Backup and Recovery Database Architecture Replication Oracle Performance Tuning Oracle DBA - Other articles Oracle scripts/ Selects for DBA Oracle Errors (ORA-nnnnn)

The last articles in the site (HOT)

The most visited articles in the site

In-Oracle.com  -> Oracle DBA -> Oracle Replication

-> Oracle Database Failover and Switchover

 

 Oracle Database Failover and Switchover

 

 

1. What does failover mean ?

2. What does switchover mean ?

3. Configure Connect Time Failover

4. Configure Transparent Application Failover

1. What does failover means ?

 

A failover is when the primary database is unavailable. Failover is performed only in the event of a catastrophic failure of the primary database, and the failover results in a transition of a standby database to the primary role. The database administrator can configure Data Guard to ensure no data loss.

 

 

2. What does switchover mean ?

 

A switchover is a role reversal between the primary database and one of its standby databases. A switchover ensures no data loss. This is typically done for planned maintenance of the primary system. During a switchover, the primary database transitions to a standby role, and the standby database transitions to the primary role. The transition occurs without having to re-create either database.

 

 

3. Configure Connect Time Failover

 

Connect time failover will reroute incoming connections to the instance that has just become primary. This type of failover should work in cases where the old primary node is down, old primary network is down, old primary listener is down,
or old primary instance is now the standby.

When the old primary network is down, failover functionality is built into the basic layer of Oracle Net. We simply tcp timeout and fail to the next host in the list. 

 

DBname_alias =
          (DESCRIPTION =
                   (ADDRESS_LIST =
                          (ADDRESS = (PROTOCOL = TCP)(HOST = primary_host)(PORT = 1521))
                          (ADDRESS = (PROTOCOL = TCP)(HOST = standby_host)(PORT = 1521))
                    )
           (CONNECT_DATA =
                          (INSTANCE_NAME=DBname_primary)
                          (SERVICE_NAME = DBname)
           )
           )

 

 

4. Configure Transparent Application Failover

 

For application failover, all existing connections from the current primary must failover to the new primary. One of the biggest obstacles to overcome is the lag time from when the standby database becomes the primary database. Client connections should continue to retry the failover until the standby has been opened as the new production. 

 

This could be done by having an alias similar to the following:

 

DBname_TAF=
           (DESCRIPTION=
                       (address_list=
                               (load_balance=off)
                               (failover=on)
                               (ADDRESS = (PROTOCOL = TCP)(HOST = primary_host)(PORT = 1521))
                               (ADDRESS = (PROTOCOL = TCP)(HOST = standby_host)(PORT = 1521))
                       ) 
            (CONNECT_DATA=
                       (instance_name=DBname_primary)
                       (SERVICE_NAME=DBname)
                       (FAILOVER_MODE=
                       (TYPE=session)
                       (METHOD=BASIC)
                       (RETRIES=200)
                       (DELAY = 3)))
           )

 

TAF will try to failover to the second node in the address_list. If it cannot connect, it will wait 3 seconds and retry again. It will retry a total of 200 times. This delay will provide the DBA with enough time to perform a switchover or activate the standby as the new production.

 

 

In-Oracle.com  -> Oracle DBA -> Oracle Replication

-> Oracle Database Failover and Switchover

Oracle Applications EBS 11i, R12      Oracle Database      Data Warehouse & BI      Oracle Middleware      PL/SQL      Linux ...

 

     Copyright (c) 2011-2015  www.in-oracle.com  |  Disclaimer: The views expressed on this web site are my own and do not reflect the views of Oracle Corporation. You may use the information from this site only at your risk.