文档地址:http://docs.oracle.com/cd/B19306_01/server.102/b14220/backrec.htm#i1006585
Overview of RMAN and User-Managed Restore and Recovery
You have a choice between two basicmethods for recovering physical files. You can:
-
Use the RMAN utility to restore and recover thedatabase
-
Restore backups by means of operating system utilities,and then recover by running the SQL*Plus
RECOVER
command--即用户托管的备份
Whichever method you choose, you can recover a database,tablespace, or datafile. Before performing media recovery, you needto determine which datafiles to recover. Often you can use thefixed view V$RECOVER_FILE
. This view lists all files that require recoveryand explains the error that necessitates recovery.
See Also:
OracleDatabase Backup and Recovery Reference for more aboutusingV$
views in a recovery scenario
RMAN Restore and Recovery
The basic RMAN recovery commands areRESTORE
and RECOVER
. UseRESTORE
to restore datafiles from backup sets or fromimage copies on disk, either to their current location or to a newlocation. You can also restore backup sets containing archived redologs, but this is usually unnecessary, because RMAN automaticallyrestores the archived logs that are needed for recovery and deletesthem after the recovery is finished. Use the RMANRECOVER
command to perform media recovery and applyarchived logs or incremental backups.
RMAN automates the procedure for recovering and restoring yourbackups and copies.
See Also:
OracleDatabase Backup and Recovery Reference for details abouthow to restore and recover using RMANUser-Managed Restore and Recovery
If you do not use RMAN, then you can restorebackups with operating system utilities and then run the SQL*PlusRECOVER
command to recover the database. You shouldfollow these basic steps:
-
After identifying which files are damaged, place the database inthe appropriate state for restore and recovery. For example, ifsome but not all datafiles are damaged, then take the affectedtablespaces offline while the database is open.
-
Restore the files with an operating system utility. If you donot have a backup, it is sometimes possible to perform recovery ifyou have the necessary redo logs dating from the time when thedatafiles were first created and the control file contains the nameof the damaged file.
If you cannot restore a datafile to its original location, thenrelocate the restored datafile and change the location in thecontrol file.
-
Restore any necessary archived redo log files.
-
Use the SQL*Plus
RECOVER
command to recover thedatafile backups.