Steps To Perform For Rolling Forward A Standby Database Using RMAN Incremental Backup When Datafile Is Added To Primary
Steps To Perform For Rolling Forward A Standby Database Using RMAN Incremental Backup When Datafile Is Added To Primary
Steps to perform for Rolling forward a standby database using RMAN incremental backup when datafile is To
added to primary (Doc ID 1531031.1) Bottom
In this Document
Goal
Solution
1) On the standby database, stop the managed recovery process (MRP)
2) On the standby database, find the SCN which will be used for the incremental backup at the primary database:
3) In sqlplus, connect to the primary database and identify datafiles added:
4) Using rman, create backup of missing datafiles and an incremental backup using the SCN derived in the previous step:
5) Transfer all backup sets created on the primary system to the standby system.
6) Restore new controlfile and catalog the backup transfered in step #5:
7) Restore missing datafiles:
8) Rename the datafiles in new standby controlfile
9) Recover the standby database with the cataloged incremental backup:
10) If the standby database needs to be configured for FLASHBACK use the below step to enable.
11) On standby database, clear all standby redo log groups:
12) On the standby database, start the MRP
References
APPLIES TO:
Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.3 [Release 10.2 to 11.2]
Oracle Database - Enterprise Edition - Version 11.2.0.4 to 11.2.0.4 [Release 11.2]
Oracle Database - Enterprise Edition - Version 12.1.0.2 to 12.1.0.2 [Release 12.1]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Information in this document applies to any platform.
*** Checked for relevance 16-OCT-2016 ***
GOAL
The steps in this section can used to resolve problems if a physical standby database has lost or corrupted archived redo data or has an
unresolveable archive gap.
SOLUTION
2) On the standby database, find the SCN which will be used for the incremental backup at the primary database:
In ideal situation the above 2 queries will return the almost same SCN. However if there is huge difference its better to take backup
using the SCN from second query (lesser SCN), as one of the datafile may be behind.
SQL> SELECT FILE#, NAME FROM V$DATAFILE WHERE CREATION_CHANGE# > <checkpoint_change# from 2>;
4) Using rman, create backup of missing datafiles and an incremental backup using the SCN derived in the previous step:
RMAN> backup datafile <missing file number>, <missing file number>, <missing file number>, <missing file number> format
'/tmp/ForStandby_%U' tag 'FORSTANDBY';
RMAN> backup incremental from SCN 3162298 database format '/tmp/ForStandby_%U' tag 'FORSTANDBY';
5) Transfer all backup sets created on the primary system to the standby system.
6) Restore new controlfile and catalog the backup transfered in step #5:
RMAN> shutdown;
Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done
run
etc.
Since the controlfile is restored from PRIMARY the datafile locations in STANDBY controlfile will be same as PRIMARY database,
so catalog datafiles in STANDBY will do the necessary rename operations.
Perform the below step in STANDBY for each diskgroup where the datafile directory structure between primary and standby are
different.
Once all files have been cataloged, switch the database to copy:
10) If the standby database needs to be configured for FLASHBACK use the below step to enable.
This note assumes all files are at the same recovery scn or very close. If nologging operations have been made or files are at different
or widely varying scns see the online documentation:
10.2: http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/scenarios.htm#CIHIAADC
11.1: http://download.oracle.com/docs/cd/B28359_01/server.111/b28294/rman.htm#SBYDB00759
11.2: http://download.oracle.com/docs/cd/E11882_01/server.112/e17022/rman.htm#CIHIAADC