Graceful Switchover (GS)

1. Introduction

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. If for some reason the process fails, it will attempt an auto-rollback depending on the stage it is at.

The section will first cover the command line interface option followed by using the Central Console.

2.  Graceful Switchover - Command Line Interface 

The Graceful Switchover command is part of the "dbvctl -o" command options.  For more detail on using this command run:  "./dbvctl -o -h" 


From the above, we can see that the Graceful Switchover command is:  ./dbvctl -d <DDC> -o switchover

You only have to execute this command on one of the servers (primary or standby). It is recommended to use the primary.

In the following example, we perform a Graceful Switchover for the DEV database running on dbv1 (primary) and dbv2 (standby): 

2.1.  Examples

The Graceful Switchover process for a single instance environment compared to an Oracle RAC configuration is the same.  Below are two examples, first using Single Instance configurations and the second between two Oracle RAC configurations.

2.1.1.  Example 1:  Single Instance Graceful Switchover

In this first example, the switchover command is executed on the primary server dbv2 for the single instance database DEV.

Once the above command is complete, the primary database is on dbv1 and the standby on dbv2.

2.1.2.  Example 2:  Oracle RAC and Graceful Switchover 

The Graceful Switchover command was executed on the primary RAC cluster and in this particular example, Dbvisit Standby was running on node 1 (kiwi81).  Once the Graceful Switchover is complete, the Oracle RAC database on kiwi81 and kiwi82 becomes standby and both instances will be in a mounted state - ready to perform recovery.

As can be seen in the last two commands the Oracle RAC database on node kiwi81 and kiwi82 is now in a mounted state ready for recovery - as the database on this cluster is now a standby database.

3.  Graceful Switchover - Central Console (GUI)

Graceful Switchover (GS) is a process which allows you to switch the roles of your Source and Destination Hosts, thereby swapping them. This can be a useful thing to do for a number of reasons, for example, if you wish to perform planned maintenance on your Source Host and therefore want the Destination Host to take over as the production host.

Step 1: Initiate the GS process by clicking the Perform Graceful Switchover button on the main page.

Step 2: Select the Configuration/DDC to work with [1]. The source is dbv1 and the target is dbv2

Step 3: Once the desired Configuration/DDC is selected [1], the system will run a Log Gap Report [2]. This is important because a Graceful Switchover can only be performed if the Archive Log Gap between your two Hosts is zero! If the log gap is more than zero, a warning message will be displayed, and you will be unable to proceed. NOTE: On RAC systems, a GS is possible when the Archive Log Gap is either 0 or 1. Before starting the GS process we need to confirm whether the observer is monitoring the configuration or not. If the observer is monitoring, please stop the monitoring. The GS will not proceed when the observer is monitoring the DDC [ 3 ]. The same applies to Reporting replicates and snapshots [ 4 ]

If the operation is possible, clicking the Submit button [5] will begin the process. Please note the warning message above this button - GS is an important process, and because it swaps the roles of the Source and Destination Hosts, will completely change how your environment works. It is possible to use GS twice to again reverse your environment back to its original configuration, however, this will take a considerable amount of time. In short, please ensure you use the GS process responsibly.

Step 4: After the GS process is underway, you will be able to track it as a separate Task in the Active Task List [1].

Step 5: Once the GS process is complete, the Source and Destination Hosts for your chosen Configuration/DDC will switch. You can confirm this by going to the Configurations page and taking note of the Source and Destination host entries [1]. The new source is dbv2 and the standby is dbv1

4. Video - How To Perform A Graceful Switchover

Part 1

Part 2