Resync Standby Database when Archivelogs at Primary are deleted.

In this scenario,the standby database lost contact(connection) with primary database for few days and hundreds of redo log was switched and unfortunately archivelogs were deleted from primary database, network problem is resolved , and now you want to resync standby db with minimun time / no downtime.
server 1 (primary database)
os: linux 64bit
db: 10gR2
db_size: 700GB
server 2 (standby database (DR))
os: linux 64bit
db: 10gR2
1. Find the current SCN of standby database.
select current_scn from v$database;
CURRENT_SCN
———–
4793543
2. On the primary database – create the needed incremental backup from the above SCN
rman target /
RMAN> BACKUP DEVICE TYPE DISK INCREMENTAL FROM SCN 4793543 DATABASE FORMAT ‘C:\temp\bkup_%U’;
3. create a new standby controlfile from production
sqlplus> alter database create standby crontrolfile ‘blah’;
4.cancel managed recovery on standby
sqlplus> recover managed standby database cancel;
5. Move your incremental backup from (2) to the standby server (empty folder) and catalog it
rman target /
rman> catalog start with ‘c:\temp\backup\’;
6. recover your standby from the incremental backup
rman> recover database noredo;
7. shutdown the standby and replace the controlfile with the one you backup in (3)
8.startup the standby and put it back into managed recovery mode
sqlplus> startup mount
sqlplus> recover managed standby database disconnect;

Category: DatabaseLinuxRMAN

Tags:

Leave a Reply

Article by: Shadab Mohammad