Database Reference
In-Depth Information
The following example performs a cancel-based incomplete recovery. If the database is open, shut it down:
$ sqlplus / as sysdba
SQL> shutdown abort;
Next, copy all data files from the backup (either a cold or hot backup). This example restores all data files from a
hot backup. For this example the current control file is intact and doesn't need to be restored. Here is a snippet of the
OS copy commands for the database being restored:
cp /u01/hbackup/O12C/system01.dbf /u01/dbfile/O12C/system01.dbf
cp /u01/hbackup/O12C/sysaux01.dbf /u01/dbfile/O12C/sysaux01.dbf
cp /u01/hbackup/O12C/undotbs01.dbf /u01/dbfile/O12C/undotbs01.dbf
cp /u01/hbackup/O12C/users01.dbf /u01/dbfile/O12C/users01.dbf
cp /u01/hbackup/O12C/tools01.dbf /u01/dbfile/O12C/tools01.dbf
After the data files have been copied back, you can initiate the recovery process. This example performs a cancel-
based incomplete recovery:
$ sqlplus / as sysdba
SQL> startup mount;
SQL> recover database until cancel;
At this point, the Oracle recovery process suggests an archive redo log to apply:
ORA-00279: change 3584872 generated at 11/02/2012 12:02:32 needed for thread 1
ORA-00289: suggestion : /u01/oraarch/O12C/1_1_798292887.dbf
ORA-00280: change 3584872 for thread 1 is in sequence #1
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
Apply the logs up to the point you where want to stop, and then type CANCEL :
CANCEL
This stops the recovery process. Now, you can open the database with the RESETLOGS clause:
SQL> alter database open resetlogs;
The database has been opened to a point in time in the past. The recovery is deemed incomplete because not all
redo was applied.
now would be a good time to get a good backup of your database. this will give you a clean point from which to
initiate a restore and recovery should a failure happen soon after you've opened your database.
Tip
 
 
Search WWH ::




Custom Search