UNTIL clause ::=
PARALLEL clause ::=
where:
DATABASE | Specifies recovering the entire database. |
USING BACKUP CONTROL FILE | Specifies that a backup of the control file is being used instead of the current control file. |
TABLESPACE tablespace | Specifies recovering a particular tablespace. Tablespace is the name of a tablespace in the current database. You may recover up to 16 tablespaces in one statement. |
DATAFILE filename | Specifies recovering a particular datafile. You can specify any number of datafiles. |
UNTIL CANCEL | Specifies an incomplete, cancel-based recovery. Recovery proceeds by prompting you with the suggested filenames of archived redo log files, and recovery completes when you specify CANCEL instead of a filename. |
UNTIL CHANGE integer | Specifies an incomplete, change-based recovery. The integer is the number of the SCN following the last change to which you wish to recover. For example, if you want to restore your database up to the transaction with an SCN of 9, you would specify UNTIL CHANGE 10. |
UNTIL TIME date | Specifies an incomplete, time-based recovery. Use single quotes, and use the following format: |
'YYYY-MM-DD:HH24:MI:SS'.
To perform media recovery on a tablespace, the database must be mounted and open, and the tablespace must be offline.
To perform media recovery on a datafile, the database can remain open and mounted with the damaged datafiles offline (unless the file is part of the SYSTEM tablespace).
Before using the RECOVER command you must have restored good copies of the damaged datafile(s) from a previous backup. Be sure you can access all archived and online redo log files dating back to when that backup was made.
When another log file is required during recovery, a prompt suggests the names of files that are needed. The name is derived from the values specified in the initialization parameters LOG_ARCHIVE_DEST and LOG_ARCHIVE_FORMAT. You should restore copies of the archived redo log files needed for recovery to the destination specified in LOG_ARCHIVE_DEST, if necessary. You can override the initialization parameters by setting the LOGSOURCE variable.
During recovery you can accept the suggested log name by hitting return, cancel recovery by entering CANCEL instead of a log name, or enter AUTO for automatic file selection without further prompting.
If you have enabled autorecovery (that is, SET AUTORECOVERY ON), recovery proceeds without prompting you with filenames. Status messages are displayed when each log file is applied.
When normal media recovery is done, a completion status is returned.
For more information on recovery and the RECOVER command, see the Oracle7 Server Administrator's Guide.
Examples
RECOVER DATABASE
RECOVER DATABASE UNTIL TIME 30-AUG-90:04:32:00
RECOVER TABLESPACE ts_one, ts_two
RECOVER DATAFILE 'data1.db'