In an Oracle Data Guard environment, the standby database acts as a backup system that remains synchronized with the primary database. During a failover, the standby database needs to be converted into the new primary database to continue business operations without downtime.
This guide explains the step-by-step process to open the standby database after a failover, ensuring smooth transition and minimal disruption.
1. Start the Standby Database in MOUNT Mode
Before performing any recovery or activation, you need to start the standby database in MOUNT mode.
SHUTDOWN IMMEDIATE;STARTUP MOUNT;
2. Check Database Role and Open Mode
Verify the current role and open mode of the database.
SELECT OPEN_MODE, DATABASE_ROLE FROM V$DATABASE;Note: OPEN_MODE should be MOUNTED (not open yet).DATABASE_ROLE should be PHYSICAL STANDBY at this point.
3. Recover the Standby Database
Next, apply all archived logs to bring the standby database fully in sync with the old primary database.
RECOVER STANDBY DATABASE;
4. Finish the Recovery Process
Once logs are applied, complete the recovery process
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
5. Convert the Standby database to the Primary Database
ALTER DATABASE ACTIVATE PHYSICAL STANDBY DATABASE;
6. Open the Database for Read/Write
ALTER DATABASE OPEN;
7. Verify Database Role and Open Mode
SELECT OPEN_MODE, DATABASE_ROLE FROM V$DATABASE;