Databases Reference
In-Depth Information
Performing Data File-Level Recovery
Problem
You have one data file that has experienced media failure. You don't want to restore and recover the entire database
or all data files associated with the tablespace. You want to perform complete recovery only on the data file that
experienced media failure.
Solution
Use the restore datafile and recover data file commands to restore and recover one or more data files.
The database can be mounted or open to restore data files.
if your database is open, you can't restore and recover data files associated with the system or undo
tablespaces. in this scenario, your database must be placed in mount mode.
Note
Recover While Database Not Open
In this scenario we mount the database and then restore and recover a missing data file. You can restore and recover
any data file in your database while the database is not open. This example shows restoring the data file 1, which is
associated with the system tablespace:
$ rman target /
RMAN> startup mount;
RMAN> restore datafile 1;
RMAN> recover datafile 1;
RMAN> alter database open;
You can also specify the file name when performing a data file recovery:
$ rman target /
RMAN> startup mount;
RMAN> restore datafile '/u01/dbfile/o12c/system01.dbf';
RMAN> recover datafile '/u01/dbfile/o12c/system01.dbf';
RMAN> alter database open;
Use the rman report schema command to list data file names and file numbers. you can also query the name
and file# columns of v$Datafile view to take names and numbers.
Tip
Keep in mind that if you're using a recovery catalog, you should connect to it when performing restore and
recover operations, for example:
$ rman target / catalog rcat/rcat@rcat
 
 
Search WWH ::




Custom Search