O'Reilly logo

Oracle SQL Plus Pocket Reference, 2nd Edition by Jonathan Gennick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

RECOVER

Synopsis

The syntax of the RECOVER command (not supported in iSQL*Plus) changes frequently. The following syntax is valid for Oracle9i Release 2:

RECOVER {general | managed | END BACKUP}

general ::=
   [AUTOMATIC] [FROM directory]
   { {full_database_recovery 
     |partial_database_recovery 
     |LOGFILE filename}
     [recovery_option [recovery_option...] ]
   |CONTINUE [DEFAULT]|CANCEL}

full_database_recovery ::=
   [STANDBY] DATABASE
   [UNTIL {CANCEL | TIME datetime | CHANGE scn}]
   [USING BACKUP CONTROLFILE]
or
   [STANDBY] DATABASE
   [USING BACKUP CONTROLFILE]
   [UNTIL {CANCEL | TIME datetime | CHANGE scn}]

partial_database_recovery ::=
   {TABLESPACE tablespace [, tablespace]... 
   | DATAFILE datafilename [, datafilename]...
   | STANDBY {TABLESPACE tablespace [, tablespace]... 
             | DATAFILE datafilename [, datafilename]...}
   UNTIL [CONSISTENT] [WITH] CONTROLFILE }

recovery_option ::=
     {TEST | ALLOW blocks CORRUPTION 
     | PARALLEL [degree] | NOPARALLEL}

managed ::=
   MANAGED STANDBY DATABASE
   [ {NODELAY | [TIMEOUT] minutes 
     | CANCEL [IMMEDIATE] [NOWAIT]}
   | [DISCONNECT [FROM SESSION] ] [FINISH [NOWAIT] ] ]

The RECOVER command initiates media recovery on a database, tablespace, or datafile. To use RECOVER, you must be connected as SYSDBA, SYSOPER, or INTERNAL (INTERNAL is not supported beginning with Oracle9i). Here are some examples:

RECOVER TABLESPACE USERS
RECOVER DATABASE UNTIL -
   TIME 20-JAN-2000:16:57:00

The hyphen (-) at the end of the first line in the second RECOVER example is the SQL*Plus continuation character. You ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required