This article defines the pre-requisites and high level process of Graceful Switchover.
Applicable Error Code
This article describes the entire Graceful Switchover process on a high level and as well as the config files needed to be changed after successfully doing so.
It is expected that the "System Requirements" section, and "Important" notes from our user guides which relates to Graceful Switchover (i.e. ASM support, etc.) have been reviewed carefully and taken into consideration prior to attempting Graceful Switchover to avoid unexpected issues. If you have not done so, we suggest to carefully review the following links:
- Make sure that a valid backup of primary database is taken before Graceful Switchover is performed.
- Schedule the outage with the business/application owner.
- Shutdown the applications.
- Stop Dbvisit schedules on both primary and standby servers.
- Run Dbvisit manually on the primary to ship logs then on the standby to apply logs.
./dbvctl -d <DDC>Ref: https://dbvisit.atlassian.net/wiki/spaces/DS8QSG/pages/106135948/Dbvisit+Standby+Command+Line+Interface+CLI#DbvisitStandbyCommandLineInterface(CLI)-3.SendingandApplyingLogs
./dbvisit <DDC>Ref: https://dbvisit.atlassian.net/wiki/spaces/UGDS7/pages/28508276/Running+Dbvisit+Sending+and+Applying+Logs
- Ensure that Standby database is up to date with the primary by running a log gap report. If there is a gap, repeat step5.
./dbvctl -d <DDC> -iRef: https://dbvisit.atlassian.net/wiki/spaces/DS8QSG/pages/127860742/Reporting+and+Monitoring#ReportingandMonitoring-2.Theloggapreportoverview
./dbvisit -i <DDC>Ref: https://dbvisit.atlassian.net/wiki/spaces/UGDS7/pages/28508280/Running+a+Log+Gap+Report
- Run the Graceful Switchover
- Point the application at the standby database server (which is now the primary) (at this stage you will need to make sure your networking - listener.ora/tnsnames.ora/sqlnet.ora on the standby server is configured, this can be done before step 1 even if not already in place).
- Start the application and users should now connect to the standby database (now the primary).
- If you are doing maintenance on the original primary then this might be down, during this time schedule should be stopped. Otherwise, you can enable Dbvisit schedules so the now standby database (old primary) will be synched automatically with the now primary database.
NOTE: You can follow the same steps as outlined above to switch the roles to its original state.