Description
After test failover, we don't want to use activated standby database as new primary and we need to re-establish the synchronization as it was before failover.
Since activation is action which can't be rolled back, we need to recreate standby database from scratch.
Solution
In this example, primary server and dbvagenmanager were online during the standby database test failover as we didn't want any downtime for failover test and we left our primary database online for our applications.
After test failover we have two read-write databases:
It's not possible to "rollback" failover on standby database, so we'll need to recreate it from scratch.
1. Remove the configuration:
2. STANDBY: Shutdown standby database and delete it
Be ABSOLUTELY SURE WITHOUT ANY DOUBT that you are on standby server before running these commands for dropping the standby database
. oraenv
rman target /
startup mount force dba;
drop database including backups;
3. PRIMARY: Verify that DDC file is correct
After removing the configuration from dbvcontrol dashboard we need to make sure the synchronization direction is correct in DDC file before importing it back again.
cd /usr/dbvisit/standbymp/oracle/conf
ls -lrt
If there's no file with extension .env, rename latest backup file, for example:
4. PRIMARY: Verify that SOURCE DDC variable (=primary server) and DESTINATION (=standby server) variables are correct:
grep -E '^SOURCE =|^DESTINATION =' dbv_MEGA.env
If the variables are NOT correct (=are in reversed order) run:
../dbvctl -d MEGA -o update_ddc_file
5. Import DDC file back into dbvcontrol
After Import the status should be as follows:
6. Re-create standby database
Now you will be able to re-create standby database with your preferred method for example as described here:
https://dbvisit.atlassian.net/wiki/spaces/DSMP/pages/3289350145/Create+DR+Database+for+Oracle
Comments