SQL Server: Graceful Switchover
This section will provide you with details on how to perform a Graceful Switchover (GS). Â A GS is done in a controlled manner with zero data loss. Â During this process, the primary and standby databases switch roles.
There is a number of checks and steps to be performed as part of this process. Unlike the previous versions, the observer or the daemon services need not be stopped/disabled before the switchover. The multiplatform control center would automatically take care of this.
When a Graceful switchover is initiated, a transaction log backup WITH NORECOVERY option is taken and this puts the primary in restoring mode. The backed up transaction log backup is transferred and restored in standby and the database is put to online mode. Click Start for the process to kick start
Â
Â
Â
Â
Preparing the environment for switchover by checking the status of the configuration and observer and disabling it. Disabling the automated standby update.
Convert the standby to primary by taking the backup with norecovery option which puts the primary database in restoring mode
Synchronize the standby by restoring the backup taken on step 1
Activating the standby database by bringing the standby database to Online status
Now the standby becomes primary and the primary becomes the standby and the agentmanager will check the status of the databases
Synchronising new standby by taking a new transaction log backup from the new primary and then restoring the transaction log backup in new standby
The last step is the check the Automated standby update state and observer and enable it.
Â