Hello, friends in this tutorial I’m going to demonstrate to you how to Resolve huge archive gap between primary and standby.
Table of Contents
How to resolve archive log gap in standby database
Suppose in between primary & standby have many archives difference like 500 archives, so we have need to recover it using incremental backup, follow me.
Action ON STANDBY
Step-1. Check the current SCN number on standby using the following command but before it just cancels the recovery.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
SQL> SELECT CURRENT_SCN FROM V$DATABASE;
CURRENT_SCN
----------------------
512520
SQL> SHU IMMEDIATE;
After that we need to take incremental backup on primary server using above SCN number, follow me.
Manually resolve archive log gap
Action ON PRIMARY
SQL> BACKUP AS COMPRESSED BACKUPSET INCREMENTAL FROM SCN 512520 DATABASE;
After taking incremental backup need to create new standby control file using following commands.
SQL> ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/u01/standby_contrlfile.ctl';
Then copy both (backup & controlfile) backup on standby.
Action ON STANDBY
Start standby database up to nomount status.
SQL> STARTUP NOMOUNT;
Now replace all existing controlfiles with the backup of controlfile be careful then start standby up to mount status.
SQL> ALTER DATABASE MOUNT;
Now connect with RMAN and start recovery, using following command.
$rman target sys/Oracle12c@ocpdr
RMAN> catalog start with '/u01/';
RMAN> recover database noredo;
After successfully recover your database then start redo apply using following command.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
How to check MRP process
Check MRP process is running or not.
SQL> SELECT SEQUENCE#,PROCESS,STATUS FROM V$MANAGED_STANDBY;
Congratulations now you have successfully recover your standby. So if you found this article (Resolve huge archive gap between primary and standby) please write in the comment box.
Read – Step by Step to configure Oracle 12c Data Guard Physical Standby
Connect with me on:
Instagram: https://www.instagram.com/shripaldba
Linkedin: https://www.linkedin.com/in/shripal-singh
Twitter: https://twitter.com/ocptechnology
Facebook: https://www.facebook.com/ocptechnology
YouTube:https://www.youtube.com/ocptechnology
2 thoughts on “Resolve huge archive gap between primary and standby”