27 October 2015

Switchover and Failover

An Oracle database operates in one of two roles: primary or standby. Data Guard helps you change the role of a database using either a switchover or a failover:

A switchover is a role reversal between the primary database and one of its standby databases. A switchover guarantees no data loss and 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.



Switchover
You can switch a database from the primary role to the standby role, as well as from standby to primary. This is known as a database switchover, because the standby database that you specify becomes the primary database, and the original primary database becomes a standby database, with no loss of data.

Whenever possible, you should switch over to a physical standby database:


  • If the switchover transitions a physical standby database to the primary role, then:
  • The original primary database will be switched to a physical standby role.
  • The online redo log files will be continuously archived from the new primary database to all standby databases in the configuration.


The original primary database will be restarted as a part of the switchover operation.

Standby databases not involved in the switchover will continue operating in the state they were in before the switchover occurred and will automatically begin applying redo data received from the new primary database.


  • If the switchover transitions a logical standby database to the primary role, then:
  • The original primary database will be switched to a logical standby role.


Neither the primary database nor the logical standby database needs to be restarted after the switchover completes.

Other logical standby databases in the broker configuration that were not involved in the switchover will remain viable after the switchover. There is no need to restart any databases. All physical and snapshot standby databases will be disabled after a switchover to a logical standby database.

Switchover to a logical standby database is disallowed when the configuration is operating in maximum protection mode.


Failover
A failover is done when the primary database (all instances of an Oracle RAC primary database) fails or has become unreachable and one of the standby databases is transitioned to take over the primary role. Failover should be performed when the primary database cannot be recovered in a timely manner. Failover may or may not result in data loss depending on the protection mode in effect at the time of the failover.



References:
http://docs.oracle.com/cd/B28359_01/server.111/b28295/sofo.htm

No comments:

Post a Comment