Database Reference
In-Depth Information
If you want to restore a range of archived redo log files, use the
FROM SEQUENCE
and
UNTIL SEQUENCE
clauses or
the
SEQUENCE BETWEEN
clause, as shown. The following commands restore archived redo log files from sequence 68
through sequence 78, using thread 1:
RMAN> restore archivelog from sequence 68 until sequence 78 thread 1;
RMAN> restore archivelog sequence between 68 and 78 thread 1;
By default, RMAN won't restore an archived redo log file if it is already on disk. You can override this behavior if
you use the
FORCE
, like so:
RMAN> restore archivelog from sequence 1 force;
Restoring to a Nondefault Location
Use the
SET ARCHIVELOG DESTINATION
clause if you want to restore archived redo log files to a location different
from the default. The following example restores to the nondefault location
/u01/archtemp
. The option of the
SET
command must be executed from within an RMAN
run{}
block.
run{
set archivelog destination to '/u01/archtemp';
restore archivelog from sequence 8 force;
}
Restoring a Control File
If you are missing one control file, and you have multiple copies, then you can shut down your database and simply
restore the missing or damaged control file by copying a good control file to the correct location and name of the
missing control file (see Chapter 2 for details).
Listed next are three typical scenarios when restoring a control file:
•
Using a recovery catalog
•
Using an autobackup
•
Specifying a backup file name
Using a Recovery Catalog
When you're connected to the recovery catalog, you can view backup information about your control files even while
your target database is in nomount mode. To list backups of your control files, use the
LIST
command, as shown:
$ rman target / catalog rcat/foo@rcat
RMAN> startup nomount;
RMAN> list backup of controlfile;
If you're missing all your control files, and you're using a recovery catalog, then issue the
STARTUP NOMOUNT
and
the
RESTORE CONTROLFILE
commands:
RMAN> startup nomount;
RMAN> restore controlfile;