SQL*Plus User's Guide and Reference
Release 9.0.1

Part Number A88827-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Command Reference, 34 of 52


RECOVER

Syntax

RECOVER {general | managed | END BACKUP}

where the general clause has the following syntax:

UNTIL CHANGE

USING BACKUP CONTROLFILE

TABLESPACE

DATAFILE

STANDBY TABLESPACE

STANDBY DATAFILE

UNTIL CONSISTENT WITH CONTROLFILE

MANAGED STANDBY DATABASE

NODELAY

TIMEOUT

CANCEL (managed clause)

CANCEL IMMEDIATE

CANCEL NOWAIT

DISCONNECT FROM SESSION

FINISH

NOWAIT

Usage

You must have the OSDBA role enabled. You cannot use the RECOVER command when connected via the multi-threaded server.

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

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 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 with the SET LOGSOURCE command.

During recovery you can accept the suggested log name by pressing return, cancel recovery by entering CANCEL instead of a log name, or enter AUTO at the prompt 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.

Examples

To recover the entire database, enter

Keyboard icon
RECOVER DATABASE 

To recover the database until a specified time, enter

Keyboard icon
RECOVER DATABASE UNTIL TIME 01-JAN-2001:04:32:00 

To recover the two tablespaces ts_one and ts_two from the database, enter

Keyboard icon
RECOVER TABLESPACE ts_one, ts_two 

To recover the datafile data1.db from the database, enter

Keyboard icon
RECOVER DATAFILE 'data1.db' 

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback