Using Graceful Switchover in Standby v9™️
Last week we hit the road running by demonstrating the awesome feature called Synchronize Standby Database, or Sync.
This week we want to look into the Graceful Switchover feature. We also refer to it as, GS. The idea behind the scenes is that we want to switch Primary and Standby database roles in a controlled manner without losing any data. If the process fails for some reason, it will attempt to do an auto-rollback depending on what stage it is at.
A Graceful Switchover is very handy when you have to perform planned maintenance on your Primary server and you want the DR Standby server to take over as the Primary server.
Typically during a GS, the Primary database is shut down and the control file from the Standby database is copied to the Primary database. Then the redo logs on the Primary database are removed and the Primary Database is mounted as the Standby database with the Standby control file and vice versa, the Standby Database creates redo logs and is mounted as the Primary database with the Primary control file. Dbvisit also makes the necessary DDC file changes to reflect the role reversal between the Primary and Standby databases. As soon as the reverse process is carried out, the Standby Database becomes the Primary Database and we can send archived logs from the new Primary Database to be applied on the New Standby database.
There are a couple of prerequisites before running a GS listed below - please also ensure to familiarise yourself with the details in the User Guide
- Ensure the Archive Log Gap between Primary and Standby is 0 if you are using Oracle RAC 0 or 1.
- Make sure the Dbvisit Daemon Processes on both Primary and Standby are stopped before running the GS.
- Ensure existing restore points on Primary are dropped before executing the GS, else the process will fail.
- Ensure Observer Monitoring is DISABLED for the particular DDC, before running the GS. If this is not done, the Observer will act on the changed database state which could cause major problems.
- If you are using RMAN in no-catalogue mode on the Primary or Standby database, and you execute the GS, all backup information and settings in the Primary or Standby control files will be rendered as unusable.
- Another consideration before running a GS, is to check if there are any services running on the database. If this is the case, you might have to set the values of the DDC variables SERVICE_USED and SERVICE_USED_DR to Y. For more information on the use of these variables please refer to the following DDC Advanced Settings.
If you have any schedules running, please make sure to stop those before continuing with the GS.
As usual, we are going to use the Central Console (GUI) to demonstrate the Graceful Switchover.
The Graceful Switchover process can also be run on the command line.
How To Perform A Graceful Switchover - Video Tutorial:
As you can see, the Graceful Switchover feature is a little bit more complex but very helpful when you have to perform planned maintenance or re-prioritise equipment. We always recommended you test the Graceful Switchover to ensure everything works when required.
Thank you for letting me demonstrate another awesome Standby™️ feature. Stay tuned for more to come.