Oracle Data Guard Manual Switchover
Published by : Obay Salah , January 5, 2025
1- check Primary and standby database role and status.
select name, open_mode, db_unique_name, database_role from v$database;
2- Check primary and standby for any gaps.
On primary: =========== select STATUS, GAP_STATUS from V$ARCHIVE_DEST_STATUS where DEST_ID = 2; On standby: =========== select NAME, VALUE, DATUM_TIME from V$DATAGUARD_STATS;
3- Check primary database status.
On primary: =========== select SWITCHOVER_STATUS from V$DATABASE;
You must see TO STANDBY or SESSIONS ACTIVE.
4- convert primary to standby and later standby to primary.
alter database commit to switchover to physical standby with session shutdown; startup mount; select name, open_mode, db_unique_name, database_role from v$database;
5- Convert standby to primary.
Our primary is already converted to standby. Now it’s time to convert original standby into primary
select SWITCHOVER_STATUS from V$DATABASE; alter database commit to switchover to primary with session shutdown; alter database open; select name, open_mode, db_unique_name, database_role from v$database;
6- On new standby – Initially your primary database: Start MRP
alter database recover managed standby database disconnect;
Comments
no comment yet!