This is a premium alert message you can set from Layout! Get Now!

Switchover and Failover

Anup
0

Database Switchover

A database can be in one of two mutually exclusive modes (primary or standby). These roles can be altered at runtime without loss of data or resetting of redo logs. This process is known as a Switchover and can be performed using the following statements:

While connected to the primary database, issue the following commands:-

  • CONNECT / AS SYSDBA
  • ALTER DATABASE COMMIT TO SWITCHOVER TO STANDBY;
  • SHUTDOWN IMMEDIATE;
  • STARTUP NOMOUNT
  • ALTER DATABASE MOUNT STANDBY DATABASE;
  • ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

Now the original Primary database is in Standby mode and waiting for the new Primary database to activate, which is done while connected to the standby database (not the original primary)

  • CONNECT / AS SYSDBA
  • ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
  • SHUTDOWN IMMEDIATE;
  • STARTUP

This process has no affect on alternative standby locations. The process of converting the instances back to their original roles is known as a Switchback. The switchback is accomplished by performing another switchover.

Database Fail Over

Graceful Database Fail over occurs when database fail over causes a standby database to be converted to a primary database:

  • ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
  • ALTER DATABASE ACTIVATE STANDBY DATABASE;

This process will recovery all or some of the application data using the standby redo logs, therefore avoiding reinstantiation of other standby databases. If completed successfully, only the primary database will need to be reinstatiated as a standby database.

Post a Comment

0 Comments

Please Select Embedded Mode To show the Comment System.*

Post a Comment
To Top