Graceful Switchover (role reversal)

Graceful Switchover (GS) is also referred to as role reversal or switchover. It is not the same as failover.
Graceful Switchover is used to switch back to the original primary database after a disaster in which the standby database has been activated. 
Graceful Switchover may also be used for planned outages to perform an upgrade on the primary site by switching over the database users to the standby site as hardware or software is upgraded on the primary site. It may also be used to test the Disaster Recovery scenario.
Graceful Switchover can be used on single and RAC databases. It can be used when the redo logs or the archive logs are in regular file system or Oracle ASM file system. 
During a switchover, the primary database transitions to a standby role, and the standby database transitions to the primary role. There is no loss of data during the transition and the standby database does not have to be rebuilt. 
After the planned outage is completed, Graceful Switchover can reverse back to the original state.

Note 1: Always ensure you have a valid backup before initiating Graceful Switchover.
Note 2: Graceful Switchover has been carefully designed so that if it fails for any reason, there will always be a rollback or roll forward path to ensure you are not left with two primary databases or two standby databases.
Note 3: Graceful Switchover supports different structures between the primary and standby database. The standby database files or redo logs may be in different directory structure (mount points) as the primary database and have different file names. The standby database must however have the same number of data files as the primary database. 
Note 4: Graceful Switchover can be initiated throught web interface (GUI) or through the command line (CLI). There is no difference in functionality, however because of the nature of web interfaces using an asynchronous connection, it is recommend to use the command line (CLI) interface when initiating Graceful Switchover in production environments. Through the web interface there is a small possibility of loosing the connection from the web browser to the webserver. In this case the graceful switchover process will continue to function in the background but the output will no longer be displayed in the browser windows. The output can always be seen in the Dbvisit Standby logs on both the primary and standby servers. 
 

Graceful Switchover overview:

  • Allows planned role reversal between the primary database and one of its standby databases. The primary database transitions to a standby role, and the standby database transitions to the primary role.
  • Is to handle scheduled outages on the primary system without the loss of service.
  • Has been tested on Oracle 8i, 9i, 10g and 11g.
  • Databases will be shutdown temporarily during the transition phase.
  • Temporary data files will be added to the new primary database.
  • Allows only a small interruption of service as users can continue operations on standby database during outage on primary database.
  • Can reverse back to the original state once scheduled maintenance is completed.
  • There is no data loss during the transition.
  • Primary Database online redo logs must be available.
  • It is recommended to test the Graceful Switchover on a test system with similar bandwidth and latency between the primary and standby server as the production systems.
  • The time taken for the switchover to complete depends on the size of the redo logs, the archive logs and the speed of the network between the primary and the standby server.
  • It can be used for normal file system database and ASM file system databases.

Dbvisit Standby Graceful Switchover limitations

In some cases, on Windows the registry setting ORA_DB _{}AUTOSTART needs to be set to FALSE. (where DB is the name of your database) The setting is in: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE. (Only set this if graceful switchover is not successful initially).

If the database uses ASM, then the ASM instance must be at least Oracle version 11.1. This limitation is only for the ASM instance and not for the database itself.

How the Dbvisit Standby Graceful Switchover process works

  1. Dbvisit Standby checkpoints are used to ensure the process between the primary and standby database are synchronised.
  2. Users should be disconnected from the main primary database.
  3. Dbvisit Standby Graceful Switchover is initiated with a simple command on the primary server and the standby server.
  4. Main primary database is shutdown during transition.
  5. Standby database is shutdown during transition.
  6. Main primary database transitions to standby database on primary server in matter of minutes*.
  7. Standby database transitions to primary database on standby server in matter of minutes*.
  8. Users can re-connect to primary database on standby server and continue working, with no data loss.
  9. Maintenance can proceed on primary server.
  10. Optionally Dbvisit Standby can keep the standby database on the primary server up to date during the scheduled maintenance outage.
  11. At the end of the scheduled maintenance the databases are transitioned back to their original state in matter of minutes*.

*Depending on speed of network and distance between primary and standby server.