Lets assume, We have a situation like standby database thats lagged so much behind from production database or unfortunatly some archive logs got deleted from primary database without being shipped and applied to standby database. In those situations in order to sync up standby database with production, we need to apply incremental backup of production database on Standby.
Follow the below steps to sync standby with production DB:
Step1: Find current SCN from standby database, So from that SCN number we will take backup on Primary side.
sql> select current_scn from v$database;
Step2: Take the incremental backup from the SCN number (37763034 - from Step1) in Production database
RMAN> run {
allocate channel c1 type disk format 'D:\backup\%U.rmb';
backup incremental from scn 37763034 database;
}
Step3: Take the standby control file backup in production database.
RMAN> BACKUP CURRENT CONTROLFILE FOR STANDBY FORMAT 'D:\backup\standby_Prod.bck';
Step4: Move incremental backup and standby controlfile to standby database
STEP5: Shutdown the standby database.
SQL> alter database recover managed standby database cancel;
SQL> shutdown
Step6: Now start standby database in nomount state and restore the backup control file.
SQL> startup nomount;
RMAN> RESTORE STANDBY CONTROLFILE FROM 'D:\backup\standby_Prod.bck';
Step7: Then mount the standby database and start recover the DR database.
SQL> alter database mount standby database;
RMAN> catalog start with 'D:\backup\';
RMAN> recover database noredo;
Step8: Then shutdown and start the database and put it in recovery mode
SQL> shutdown
SQL> startup nomount;
SQL> alter database mount standby database;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
Thats It..Hope this will help you...:)
Best Regards,
Follow the below steps to sync standby with production DB:
Step1: Find current SCN from standby database, So from that SCN number we will take backup on Primary side.
sql> select current_scn from v$database;
Step2: Take the incremental backup from the SCN number (37763034 - from Step1) in Production database
RMAN> run {
allocate channel c1 type disk format 'D:\backup\%U.rmb';
backup incremental from scn 37763034 database;
}
Step3: Take the standby control file backup in production database.
RMAN> BACKUP CURRENT CONTROLFILE FOR STANDBY FORMAT 'D:\backup\standby_Prod.bck';
Step4: Move incremental backup and standby controlfile to standby database
STEP5: Shutdown the standby database.
SQL> alter database recover managed standby database cancel;
SQL> shutdown
Step6: Now start standby database in nomount state and restore the backup control file.
SQL> startup nomount;
RMAN> RESTORE STANDBY CONTROLFILE FROM 'D:\backup\standby_Prod.bck';
Step7: Then mount the standby database and start recover the DR database.
SQL> alter database mount standby database;
RMAN> catalog start with 'D:\backup\';
RMAN> recover database noredo;
Step8: Then shutdown and start the database and put it in recovery mode
SQL> shutdown
SQL> startup nomount;
SQL> alter database mount standby database;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
Thats It..Hope this will help you...:)
Best Regards,
Nature always helps a writer to learn from its elements. Nature always try to teach new lessons and a writer transform its experience into words. He can transform even silence into words. This blog taught me a lesson. medium cursus
ReplyDelete