You must also have the OSDBA role enabled. You cannot be connected to Oracle7 through the multi-threaded server architecture. Your instance must have the database mounted in exclusive mode.
Note: It is recommended that you perform media recovery using Server Manager rather than using the ALTER DATABASE command with the RECOVER clause.
AUTOMATIC
FROM
STANDBY
recovers the standby database using the controlfile and archived redo log files copied over from the primary database. For more information, see the Oracle7 Server Administrator's Guide.
DATABASE
UNTIL CANCEL
UNTIL TIME
performs time-based recovery. This parameter recovers the database to the time specified by the date. The date must be a character literal in the format 'YYYY-MM-DD:HH24:MI:SS'.
UNTIL CHANGE
USING BACKUP CONTROLFILE
specifies that a backup control file is being used instead of the current control file.
TABLESPACE
recovers only the specified tablespaces. You can use this option if the database is open or closed, provided the tablespaces to be recovered are offline.
DATAFILE
LOGFILE
continues media recovery by applying the specified redo log file.
CONTINUE
continues multi-instance recovery after it has been interrupted to disable a thread.
CONTINUE DEFAULT
continues recovery by applying the redo log file that Oracle7 has automatically generated.
CANCEL
terminates cancel-based recovery.
PARALLEL
specifies degree of parallelism to use when recovering. See parallel_clause .
For most purposes, the RECOVER Server Manager command is easier to use than the ALTER DATABASE command. For information on this command, see Oracle Server Manager User's Guide.
For more information on media recovery, see the "Recovering a Database" chapter of Oracle7 Server Administrator's Guide.
You can use the ALTER DATABASE command with the RECOVER clause if you want to write your own specialized media recovery application using SQL.
Example I
The following statement performs complete recovery of the entire database:
ALTER DATABASE RECOVER AUTOMATIC DATABASE
Oracle7 automatically generates the names of redo log files to apply and prompts you with them. The following statement applies a suggested file:
ALTER DATABASE RECOVER CONTINUE DEFAULT
The following statement explicitly names a redo log file for Oracle7 to apply:
ALTER DATABASE RECOVER LOGFILE 'diska:arch0006.arc'
Example II
The following statement performs time-based recovery of the database:
ALTER DATABASE AUTOMATIC
RECOVER UNTIL TIME '1992-10-27:14:00:00'
Oracle7 recovers the database until 2:00pm on October 27, 1992.
Example III
The following statement recovers the tablespace USER5:
ALTER DATABASE
RECOVER TABLESPACE user5