Thursday, September 24, 2009

Recover standby database using incremental backup

# on the standby find the current scn

select min(CHECKPOINT_CHANGE#) from v$datafile_header;
select distinct min(CHECKPOINT_CHANGE#) from v$datafile_header

# on the primary use rman to backup

connect target /
backup incremental from scn 34814477971 database format '/oraexport2/standby_%U';

# on the standby recover the database
catalog start with '/oraexport2/';
recover database noredo;

# May also need to backup standby controlfile from primary and restore to standby, then rename datafiles to match files on disk. If any datafiles have been added to the primary they will need to be backed up seperately and restored to the standby.