Oracle Server Manager User's Guide

Contents Index Home Previous Next

RECOVER

Purpose

Performs media recovery on one or more tablespaces, one or more datafiles, or the entire database.

Prerequisites

You must be connected to the Oracle server as INTERNAL, SYSOPER, or SYSDBA. You cannot use the RECOVER command when connected via the multi-threaded server.

Syntax

RECOVER command ::=

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'. 
PARALLEL DEGREE specifies the number of recovery processes used to apply redo entries to datafiles on each instance. An integer specified for DEGREE overrides the initialization parameter RECOVERY_PARALLELISM.
DEGREE DEFAULT indicates that twice the number of datafiles being recovered is the number of recovery processes to use.
INSTANCES specifies the number of instances to use for parallel recovery. The number of recovery processes specified with DEGREE is used on each instance, thus the total number of recovery processes is the integer specified with DEGREE multiplied by the integer specified with INSTANCES. INSTANCES is only pertinent for the Oracle Parallel Server.
INSTANCES DEFAULT or not including the INSTANCES keyword causes has operating system-specific consequences. Consult your Oracle operating system documentation for a description of the default behavior of the INSTANCES DEFAULT specification.
NOPARALLEL Specifies that recovery is to proceed serially. Note that a specification of PARALLEL(DEGREE 1 INSTANCES 1) is equivalent to specifying the NOPARALLEL keyword.
The PARALLEL keyword overrides the RECOVERY_PARALLELISM initialization parameter. The number specified with the PARALLEL keyword is the number of recovery processes used to apply redo entries to datafiles.

SQL Worksheet Behavior

In a SQL Worksheet, if you issue the RECOVER command without arguments, Server Manager brings up the Recover dialog box. For a description of the Recover dialog box, see Chapter 9, "Using the SQL Worksheet."

Usage Notes

To perform media recovery on an entire database (all tablespaces), the database must be mounted EXCLUSIVE and closed.

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' 


Contents Index Home Previous Next