Control files are required to recover a database to the current state. Restore control files in the following scenarios:
- The control file is lost and you need to restore the backup repository contained in the control file.
If your database consists of multiple control files copies, you can replace a corrupted control file by manually copying an existing control file, and then restoring it.
You can find the backup id in the BRBACKUP and BRARCHIVE (sapbackup/saparch detail) files.
Example
The value after the #SAVED line is the backup id.
In the following examples, the backup IDs are '10117894_7567' and '10117894_7568'
BR0280I BRBACKUP time stamp: 2016-03-07 13:17:10
#PFLOG.... /oraprdhome/app/ora11g/product/home1/PRD/sapbackup/besrellt.anf
#SAVED.... 10117894_7567
BR0280I BRARCHIVE time stamp: 2016-03-07 13:41:00
#PFLOG.... /oraprdhome/app/ora11g/product/home1/PRD/saparch/aesrenmf.cds
#SAVED.... 10117894_7568
Before You Begin
-
Perform a full backup on a SAP for Oracle online subclient.
-
If you use the util_file (BACKINT) interface, modify the init<SID>.utl file. For information on the parameters, see Supported SAP for Oracle Util File Parameters.
-
If you use the rman_util interface, modify the init<SID>.sap file. For information on required and optional SBT parameters, see SBT Parameters.
-
If the init<DESTINATION_SID>.sap file does not exist, create the file. On the command line, type the following:
brrestore -d util_file -b2 \#NULL -m $ORACLE_HOME/dbs/initDESTINATION_SID.sap -
Get the SAP Backup ID for the job from the BRBACKUP or BRARCHIVE detail file
-
Set the destination database to NOMOUNT mode.
-
Optional: To have the CommCell Console authenticate the job, configure the parameters for CommCell Console third-party job authentication.
Procedure
UTIL_FILE Interface
-
On the command line, type the following command, substituting the BACKUP_ID and control_file_path variables.
brrestore –d util_file -b2 BACKUP_ID -m control_file_pathExample
brrestore -d util_file -b2 66526239_2516258 -m /u01/app/112/dbhome/CER/sapbackup/cntrlCER.dbf
RMAN_UTIL Interface
-
On the command line, type the following command, substituting the BACKUP_ID and control_file_path variables.
brrestore –d util_file -b2 BACKUP_ID -m control_file_pathExample
brrestore -d util_file -b2 66526239_2516258 -m /u01/app/112/dbhome/CER/sapreorg/cntrlCER.dbf
What to Do Next
-
Recover the database.
-
Restore the archive logs if needed.
-
If you performed a point-in-time restore, open the database with the RESETLOGS option.