Databases Reference
In-Depth Information
When restoring a data file, either your database must be in mount mode or if the database is already open, the
data files being restored must be offline.
Note
The following command forces RMAN to restore a file, even if RMAN determines that file doesn't need to
be restored:
RMAN> restore datafile '/u01/dbfile/o12c/users01.dbf' force;
You should see a message similar to this at the bottom of your RMAN messages stack:
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
You can now perform recovery on the data files restored and either open the database or if the database is already
open, recover and restore the appropriate data files and place them online.
How It Works
By default, RMAN will not restore a data file that is in the correct location and contains the expected information in
the data file header. This is known as restore optimization. You rarely will need to use the force feature, but in some
circumstances, you may know an aspect about your environment that RMAN is not aware of, and thus need to force a
restore. To override RMAN's default behavior, use the force command.
The force command works with any restore command. For example, if you know the particular data file
number, you can use the force command this way:
RMAN> restore datafile 42 force;
Similarly, you can use the force command on a tablespace. Here we use the force command to restore all data
files associated with the users tablespace:
RMAN> restore tablespace users force;
To force RMAN to restore all data files in the database, issue this command:
RMAN> restore database force;
By default, RMAN won't restore archived redo log files if they already exist on disk. If you want to override this
behavior and restore all archive redo logs contained in backup sets, do so as follows:
RMAN> restore archivelog all force;
Restoring from an Older Backup
Problem
You want to specifically instruct RMAN to restore from a backup set that is older than the last backup that was taken.
Solution
You can restore an older backup a couple different ways: using a tag name or using the restore ... until command.
 
 
Search WWH ::




Custom Search