Steps to perform role reversal.
@Production
Verify sync and perform 4-5 log switches to check connectivity and sync b/w PR and DR.
Take cold backup(If Possible) or else take RMAN backup of PR.
Please check RMAN Label for RMAN Backup script.
SQL > set time on timing on
SQL> select name,DATABASE_ROLE,SWITCHOVER_STATUS from v$database;
SQL > Alter database commit to switchover to physical standby with session shutdown;
Wait For END-of-REDO message on alert logs of PR and match ACTIVATION ID in alert of both PR and DR.
SQL > shutdown immediate
SQL > startup nomount
SQL > alter database mount standby database;
@Production
Verify sync and perform 4-5 log switches to check connectivity and sync b/w PR and DR.
Take cold backup(If Possible) or else take RMAN backup of PR.
Please check RMAN Label for RMAN Backup script.
SQL > set time on timing on
SQL> select name,DATABASE_ROLE,SWITCHOVER_STATUS from v$database;
SQL > Alter database commit to switchover to physical standby with session shutdown;
Wait For END-of-REDO message on alert logs of PR and match ACTIVATION ID in alert of both PR and DR.
SQL > shutdown immediate
SQL > startup nomount
SQL > alter database mount standby database;
----------------------------------------------------------------------------------------------------------------------
@DR
SQL > alter database recover managed standby database cancel;
SQL > alter database commit to switchover to primary;
SQL > shutdown immediate
SQL > Startup
SQL > select name,open mode,log mode from v$database;
SQL > select * from v$recover file;
SQL > select * from v$tempfile;
SQL > alter system set log archive dest state 3='ENABLE';
--------------------------------------------------------------------------------------------------------------------------
@Production
SQL > alter system set log archive dest state 2='DEFER';
Start MRP Process
SQL > alter database recover managed standby database parallel 64 disconnect from session ;
SQL > select dest_id,error,status from v$archive_dest_status;
--------------------------------------------------------------------------------------------------------------------------
@DR
SQL > alter system switch logfile;
Check log applying in PR.
select process,status,sequence#,block# from v$managed_standby;
Incase if MRP is not picking up the archive log,try doing enable and defer for the destination.
That will help,Or else check configuration.
NOTE : RAC and Single instance steps for DR Drill is same,The only thing to be done incase of RAC is to convert PR DR into single instance.
That can be done by shutting down the other instance apart from Master node.
For Example if a 2 Node RAC ,Convert it to single node for both PR and DR(shutting down instance 2),After role reversal just need to startup the other node in desired mode.
*****************DONE*******************************