Manual Failover Physical Standby Database

 

 

 

 

 

 

 
Steps For Manual Failover to a Physical Standby Database

 

Pre Checks:
 
SYS@sharkstd>>>SELECT PROTECTION_MODE,PROTECTION_LEVEL,DATABASE_ROLE ROLE,SWITCHOVER_STATUS FROM V$DATABASE    ;
 
PROTECTION_MODE              PROTECTION_LEVEL              ROLE                  SWITCHOVER_STATUS
——————–                             ——————–                             —————-                      ——————–
MAXIMUM PERFORMANCE    MAXIMUM PERFORMANCE    PHYSICAL STANDBY SESSIONS ACTIVE
 
 
 
Identify archive logs gap using below query:
 

 

 

 

SYS@sharkstd>>>select * from v$archive_gap;

 
If exist resolve it.
 
Commands to Perform manual Failover to Physical Standby Database:
 
Step1:
Before doing failover in RAC environment  "shutdown abort" of all instances of secondary standby databases.
 
Run followiing command to initiate failover:
 

 

 

 

SYS@sharkstd>>>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH; 

 
Check if target database is not configured with standby redo logs or they are not active, then follow below commands:
 
 

 

 

 

SYS@sharkstd>>>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH
 SKIP STANDBY LOGFILE;
 

STEP2:

 
Now convert physical standby to primary role:
 

 

 

 

SYS@sharkstd>>>ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY; 

NOTE:
 If "COMMIT TO SWITCHOVER TO PRIMARY" does not execute for any reason then
 run below command:
 


 

 

 

SYS@sharkstd>>> ALTER DATABASE ACTIVATE STANDBY DATABASE;


STEP3:
 
Now shutdown the database and startup again. 


 

 

 

SYS@sharkstd>>>SHUTDOWN IMMEDIATE;  

SYS@sharkstd>>>STARTUP;
SYS@sharkstd>>>SELECT OPEN_MODE FROM V$DATABASE;

OPEN_MODE
----------
READ WRITE
 

 


 

 
 
 
 
 
You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply