RECOVER_DATABASE

RECOVER_DATABASE

Recover database

(1) Required Privileges

You must have the ALTER DATABASE system privilege. To specify the RECOVER clause, you must also have the SYSDBA system privilege.

(2) Using Parallel Recovery Processes:

Example

The following statement performs tablespace recovery using parallel recovery processes:

ALTER DATABASE RECOVER TABLESPACE PARALLEL;

Database Recovery:

Examples

The following statement performs complete recovery of the entire database, letting Oracle Database generate the name of the next archived redo log file needed:

ALTER DATABASE RECOVER AUTOMATIC DATABASE;

The following statement explicitly names a redo log file for Oracle Database to apply:

ALTER DATABASE RECOVER LOGFILE 'diskc:log3.log';

The following statement recovers the standby datafile /finance/stbs_21.f, using the corresponding datafile in the original standby database, plus all relevant archived logs and the current standby database control file:

ALTER DATABASE RECOVER STANDBY DATAFILE '/finance/stbs_21.f' UNTIL CONTROLFILE;

The following statement performs time-based recovery of the database:

ALTER DATABASE RECOVER AUTOMATIC UNTIL TIME '2001-10-27:14:00:00';

Oracle Database recovers the database until 2:00 p.m. on October 27, 2001.
For an example of recovering a tablespace, see "Using Parallel Recovery Processes: Example".

Recovering a Managed Standby Database:
Examples

The following statement recovers the standby database in managed standby recovery mode:
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE;

The following statement puts the database in managed standby recovery mode. The managed recovery process will wait up to 60 minutes for the next archive log:

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE TIMEOUT 60;

If each subsequent log arrives within 60 minutes of the last log, recovery continues indefinitely or until manually terminated.

The following statement terminates the managed recovery operation:

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL IMMEDIATE;

The managed recovery operation terminates before the next group of redo is read from the current redo log file. Media recovery ends during the process of applying redo from the current redo log file.