Databases Reference
In-Depth Information
Not Using Auto Backup with RMAN Backup Piece in Nondefault Location
You can configure your RMAN backup pieces to be written to a specific location via the configure channel device
command as follows:
RMAN> configure channel device type disk format '/u01/rman/o12c/%d%U.bk';
This instructs RMAN to write backups to the /u01/rman/o12c directory with the specified file format. When you
need to restore from an RMAN backup piece directly, you need to provide RMAN with the directory and backup file
name when you issue the restore command. For example:
$ rman target /
RMAN> startup nomount;
RMAN> restore controlfile from '/u01/rman/o12c/O12C19ngbbph_1_1.bk';
How It Works
If you've enabled the auto backup of your control file feature, RMAN will look for the backup that contains the control
file in the default location. If the RMAN backup piece is not in the default location, you can tell RMAN explicitly where
to retrieve it from.
When you don't use the FRA or the recovery catalog, then it's more complicated to restore the control file.
You need to supply RMAN information such as the DBID or the exact name and location of the backup piece to
successfully restore the control file. This can be time-consuming and error prone; therefore, it is recommended that
you use a FRA or a recovery catalog when backing up your control file.
Restoring Control File to Nondefault Location
Problem
You want to restore your control file to a location other than the default location specified by your
control_files parameter.
Solution
Use the restore controlfile to command. The syntax varies slightly depending on whether you're using auto
backups or a recovery catalog, or manually configuring the location of the backups.
Your database can be in nomount, in mount, or open when you use the restore controlfile to command. If
your database is mounted or open, then you must use the restore controlfile to command to restore your control
file. This is because RMAN will not let you overwrite the current (open) control file. That's a good thing.
Note
Using Auto Backups
This example shows the syntax when restoring to a nondefault location and using an auto backup of the
control file:
$ rman target /
RMAN> restore controlfile to '/u01/test/control01.ctl' from autobackup;
 
 
Search WWH ::




Custom Search