Hello, friends in this tutorial I’m going to demonstrate to you how to Resolve huge archive gap between primary and standby.
How do I resolve an archive gap?
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;
Manually resolve archive log gap
Step-2. After that, we need to take incremental backup on the primary server using the above SCN number, follow me.
Action ON PRIMARY
SQL> BACKUP AS COMPRESSED BACKUPSET INCREMENTAL FROM SCN 512520 DATABASE;
Step-3. After taking incremental backup need to create a new standby control file using the following commands.
SQL> ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/u01/standby_contrlfile.ctl';
Then copy both (backup & controlfile) backup on standby.
Action ON STANDBY
Step-4. Start standby database up to nomount status.
SQL> STARTUP NOMOUNT;
Step-5. Now replace all existing controlfiles with the backup of controlfile be careful then start standby up to mount status.
SQL> ALTER DATABASE MOUNT;
Step-6. connect with RMAN and start recovery, using the following command.
$rman target sys/Oracle12c@ocpdr
RMAN> catalog start with '/u01/';
RMAN> recover database noredo;
Step-7. After successfully recover of your standby database, start the redo apply process using the 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 recovered 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/digitalshripal/
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
3 thoughts on “Resolve huge archive gap between primary and standby”