Steps To Perform For Rolling Forward A Physical Standby Database Using RMAN Incremental Backup
Steps To Perform For Rolling Forward A Physical Standby Database Using RMAN Incremental Backup
Steps To Perform For Rolling Forward A Physical Standby Database Using RMAN Incremental Backup
Steps to perform for Rolling Forward a Physical Standby Database using RMAN Incremental Backup. (Doc
ID 836986.1)
In this Document
Goal
Solution
1) Stop the managed recovery process (MRP) on the STANDBY database
2) Determine the SCN of the STANDBY database.
3) Take an incremental backup of the PRIMARY database
4) Transfer all backup sets to STANDBY server
5) Catalog the backups in STANDBY controlfile.
6) Recover the STANDBY database with the cataloged incremental backup:
7) In RMAN, connect to the PRIMARY database and create a standby control file backup:
8) Copy the standby control file backup to the STANDBY system.
9) Capture datafile information in STANDBY database.
10) From RMAN, connect to STANDBY database and restore the standby control file:
11) Shut down the STANDBY database and startup mount:
12) Catalog datafiles in STANDBY if location/name of datafiles is different
13) Configure the STANDBY database to use flashback (optional)
14) On STANDBY database, clear all standby redo log groups:
15) On the STANDBY database, start the MRP
References
APPLIES TO:
Oracle Database - Enterprise Edition - Version 10.2.0.1 to 12.1.0.2 [Release 10.2 to 12.1]
Information in this document applies to any platform.
Checked for relevance on 21-AUG-2015
GOAL
The steps in this section can used to resolve problems of missing or corrupted archive log file, an unresolveable archive gap, or need to roll
standby forward in time without applying a large number of archivelog files.
SOLUTION
Note:
If you use 'DataGuard Broker', then it should be stopped before starting with step 1 and re-started again when all steps finished.
Note: For the remaining steps, the standby database must be in a MOUNT state.
1 of 6 10/10/2017, 4:37 AM
Document 836986.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...
On the standby database, find the SCN which will be used for the incremental backup at the primary database:
You need to use the 'lowest SCN' from the queries below:
CURRENT_SCN
--------------
3164433
MIN(F.FHSCN)
----------------
3162298
You need to use the 'lowest SCN' from the queries, in this example is SCN: 3162298. Therefore, From the above you need to
backup from SCN 3162298
In RMAN, connect to the primary database and create an incremental backup from the SCN derived in the previous step:
RMAN> BACKUP INCREMENTAL FROM SCN 3162298 DATABASE FORMAT '/tmp/ForStandby_%U' tag 'FORSTANDBY';
All backups created by step #3 must be transferred from the primary to the standby system. If the backup is written to NFS device, this
step can be skipped.
In order for the standby database to know about the backups, catalog the backup pieces on the STANDBY database.
Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done
2 of 6 10/10/2017, 4:37 AM
Document 836986.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...
7) In RMAN, connect to the PRIMARY database and create a standby control file backup:
We now need to refresh the standby controlfile from primary controlfile (for standby) backup. However, since the datafile names are likely
different than primary, let's save the name of datafiles on standby first, which we can refer after restoring controlfile from primary backup to
verify if there is any discrepancy. Run below query from Standby and save results for further use.
spool datafile_names_step8.txt
set lines 200
col name format a60
select file#, name from v$datafile order by file# ;
spool off
10) From RMAN, connect to STANDBY database and restore the standby control file:
RMAN> SHUTDOWN;
RMAN> STARTUP MOUNT;
Since the controlfile is restored from PRIMARY the datafile locations in STANDBY controlfile will be same as PRIMARY database, if the
directory structure is different between the standby and primary or you are using Oracle managed file names, catalog the datafiles in
STANDBY will do the necessary rename operations. If the primary and standby have identical structure and datafile names, this step can be
skipped.
Perform the below step in STANDBY for each diskgroup where the datafile directory structure between primary and standby are different.
3 of 6 10/10/2017, 4:37 AM
Document 836986.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...
Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done
If any datafiles have been added to Primary AFTER scn 3162298 they will also have to be restored to the standby host (see Note 1531031.1
Steps to perform for Rolling forward a standby database using RMAN incremental backup when datafile is added to primary) and cataloged
as shown above before doing the switch.
To determine if any files have been added to Primary since the standby current scn:
If the above query returns with 0 zero rows, you can switch the datafiles. This will rename the datafiles to its correct name at the standby
site:
Note:
a) At this point, you can compare the query output from step 9 for any discrepancy (other than newly added datafiles) to ensure we have all
the datafiles added in standby.
b) run the queries from step 2 again to confirm that the incremental apply has moved the datafiles forward. The SCN should now be bigger
than its initial values.
If the STANDBY database needs to be configured for FLASHBACK run the following commands:
To resolve NOLOGGING operations only, see the online documentation, and Note 958181.1
4 of 6 10/10/2017, 4:37 AM
Document 836986.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...
Community Discussion
You can directly participate in the Discussion about this article below. The Frame is the interactive live Discussion - not a
Screenshot ;-)
REFERENCES
NOTE:1531031.1 - Steps to perform for Rolling forward a standby database using RMAN incremental backup when datafile is added to
primary
NOTE:958181.1 - Rolling a Standby Forward using an RMAN Incremental Backup To Fix The Nologging Changes
NOTE:841765.1 - Roll Forward a Physical Standby Database Using RMAN Incremental Backups 'Recover Database Noredo' Does Nothing
5 of 6 10/10/2017, 4:37 AM
Document 836986.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...
6 of 6 10/10/2017, 4:37 AM