1.Get last SCN number on Standby database
SQL> select current_scn from v$database;
2.Stop the managed standby apply process:
SQL> alter database recover managed standby database cancel;
3.Shutdown the standby database
SQL> shutdown immediate;
PRIMARY:
4.On the primary, take an incremental backup from the SCN number where the standby has been stuck:
RMAN>
run {
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
backup incremental from scn xxxx
FORMAT '/db_backup/RMAN/temp/incr_standby_%U';
}
5.On the primary, create a new standby controlfile:
SQL> alter database create standby controlfile as '/
Copy these files to standby host:
6.Scp the files to standby server
$ scp * oracle@
STANDBY:
7.Bring up the instance in nomount mode:
SQL> startup nomount
8.Check the location of the controlfile and Replace all controlfiles with the one you just created in primary.
SQL> show parameter control_files
cp /
--for ASM, use RMAN to restore control file
RMAN> restore controlfile from '/db_backup/RMAN/temp/xxxxx_4standby.ctl';
9.Mount the standby database:
SQL> alter database mount standby database;
10.Make sure the recovery is not started
SQL> alter database recover managed standby database cancel;
11.RMAN Catalog the files and recover database noredo.
$rman target=/
RMAN> catalog start with '
Recover these files:
RMAN> switch database to copy; --if primary and standby use different paths
$RMAN> recover database noredo;
12.Restart the broker on standby.(if you are using dg broker)
SQL> alter system set dg_broker_start=false scope=both;
SQL> alter system set dg_broker_start=true scope=both;
13.Start recovery on standby.
SQL> alter database recover managed standby database disconnect from session;