Activating a Standby Database (Failover)

When disaster strikes and the primary database is no longer available the standby database must be activated to become the new primary database to continue operation. 
This is also called failover to the standby database.
The steps to activate the standby database are:

  1. Stop the scheduling of Dbvisit Standby.
  2. Change the network configuration (or DNS) so that users will connect to the standby database (or server) instead of the primary database (or server).
  3. Activate and open the standby database for normal operation as per instructions below. As soon as the standby database is activated and becomes the new active primary database, the link to the original primary database is lost and it is no longer possible to apply new logs to the original standby database.

To activate and open the standby database for continued operation in the event of a disaster the following procedure must be used:

On the standby server using CLI:

 

To Activate a standby database you have to make use of the "dbv_oraStartStop activate <DDC> [Yes] [nosync]" command (options in brackets [] are optional)

CommandDescription
dbv_oraStartStop activate <DDC> [Yes] [nosync]

This command is used to Activate the standby database, during which process it becomes the new primary database.  Important, this operation MUST be done with caution as the process is NOT reversable.  

This action is performed in the event that the primary database is no longer available. Dbvisit Standby will prompt before activating the standby database.  

If the Yes parameter is given then Dbvisit Standby will no longer prompt before activating the standby database (this option can be used in batch mode).  

NOTE: Yes option does not assume "Yes" answers to the questions asked in the interactive mode. Hence, on the event that APPLY_DELAY_LAG_MINUTES (i.e. APPLY_DELAY_LAG_MINUTES = 180) is set in the DDC, and standby is activated in batch mode, it will most likely fail or canceled. If APPLY_DELAY_LAG_MINUTES is set in the DDC, the correct way of activating the standby is via interactive mode.

If the nosync parameter is given, Dbvisit Standby will not transfer the updated (reversed) DDC file to the original primary if any schedules are running on the newly activated primary.  When the standby database is activated it is no longer possible to keep the new primary and the old primary databases in sync.  A new standby database must be created after activation.  Updates the Dbvisit Database Configuration (DDC) file and reverses the primary and standby variables so that  Dbvisit Standby processing can be reversed when a new standby database has been created.

 

1. Manually run Dbvisit Standby to ensure all log files have been applied.

 

dbvisit w102n
Where w102n is the name of the database.

2. Activate the standby database. A prompt will be displayed to ask for confirmation:

 

dbv_oraStartStop activate w102n

3. As soon as possible, back up your new production database. At this point, the former standby database is now your production database. This task, while not required, is a recommended safety measure because you cannot recover changes made after activation without a backup.

On the standby server using GUI:

1. Manually run Dbvisit Standby to ensure all log files have been applied.

Home > Run > Run Interactive > Standby Server tab > select Database from drop-down menu > select Default from Run Action drop-down menu > Run

2. Activate the standby database. A prompt will be displayed to ask for confirmation:

3. As soon as possible, back up your new production database. At this point, the former standby database is now your production database. This task, while not required, is a recommended safety measure because you cannot recover changes made after activation without a backup.

The new production database is now operational and users can connect to continue operation. Once the old primary server is available again, a new standby database can be built on this server. Dbvisit Standby can then be run as normal to keep the new standby database in synch with the primary database.

For automatically activating the standby the following command may be given. This will not prompt for confirmation.

dbv_oraStartStop activate w102n Yes