SWITCH OVER IN DATAGUARD

 

CHECK THE FOLLOWING IN PRIMARY AND STANDBY

STEP-1

STANDBY

-Keep the database in mount state

-keep the standby in MRP mode

 

 

STEP-2

FIND THE SYNC GAP ON BOTH PRIMARY AND STANDBY

 

PRIMARY                                                                                                                   STANDBY

 

– select * from archive_gap;

-if there is no sync there will be

Wait_for_gap

-if they are sync the above will not show

– in stand by we can see wait_for_log but the process is MRP0 ‘0’ is for waiting log

-MRP(FG) means there is no sync

-check the below command with both  primary and standby both should be similar

 

STEP-3

TO CHECK WITH THE ERROR THAT OCCURE IN DATAGUARD CONF

STEP-4

SWITCHOVER

-All transaction in primary should be applied in stand by before the switch over

alter system switch logfile;

run it in the primary db and check the trace if the recent archivelog is applied

-Then Clear all the tail state redolog and create archive log in standby by executing the below command

Alter system archive log current

-check it the standby side if that is applied

The cancel the MRP mode in standby

alter database recover manager standby database cancel;

 

Check the switch over status in standby

Select switchover_status from v$database

 

STEP -5

RUN THE SWITCHOVER COMMAND IN PRIMARY

alter database commit to switchover to physical standby with session shutdown;

 

RUN THE COMMAND ON STANDBY DB

 

alter database commit to switchover to primary wait with session shutdown;

In case while executing the command if you face any error first –> recover standby database;

 

Once the query is executed shutdown the database and startup

 

STEP-6

 

CURRENT STANDBY

Now check the status the standby will be primary

 

CURRENT PRIMARY

shutdown the database and open in mount

 

-enable the MRP mode and switch the log file and check the sync in the standby database

-it will be in sync check it in the trace of standby DB and current primary

-alter system switch logfile –> in primary you can see the archive log generated in standby

 

Recent Posts

Start typing and press Enter to search