##### Sync Oracle Standby DB using SCN Based Backup of Primary #####
Oracle Standby Database
NOTE: S = Standby Database and P = Primary Database
set line 180
set numf 999999999999999
1. S -> select min (checkpoint_change#) from v$datafile_header order by 1;
2. P -> SQL> alter system set log_archive_dest_state_2=defer scope=both;
3. P -> rman target /
RMAN> BACKUP INCREMENTAL FROM SCN 6041456613961 DATABASE FORMAT ‘/backup/PROD/SCN_BKP/PROD_bkp_%U.bak’ tag ‘4STNDBY’;
4. SCP the backup pieces to the standby server.
5. S -> SQL> alter database recover managed standby database cancel;
6. S -> Catalog backup pieces to standby site.
RMAN> catalog start with ‘/u04/stdby/BKP’;
7. S -> RMAN> recover database noredo;
8. P -> RMAN> BACKUP CURRENT CONTROLFILE FOR STANDBY TAG STANDBYCRTL FORMAT ‘/backup/PROD/SCN_BKP/PRIM_STANDBY.ctl’;
9. SCP the standby control file to the standby host and restore control file on standby database.
At Standby Server:
SQL> shutdown immediate;
SQL> startup nomount;
RMAN> RESTORE STANDBY CONTROLFILE FROM ‘/u04/stdby/BKP/PRIM_STANDBY.ctl’;
SQL> alter database mount;
10. P -> alter system set log_archive_dest_state_2=ENABLE scope=both;
11. S -> SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;