recover database backup recovery of the oracle four statements difference

1  recover database using backup controlfile
2  recover database until cancel
3  recover database using backup controlfile until cancel;
4  recover database until cancel using backup controlfile;

This paper describes the following four restore meaning the difference between the way:
 
1. recover database using backup controlfile

 If the current control file is lost, cold backup when the control file recovery, used to tell the Oracle , in the scn Do not controlfile as the end of recovery;
 
2. recover database until cancel
 
If you lose your current / active redo when manually specify the endpoint.
 
3. recover database using backup controlfile until cancel;
 
 If you lose your current controlfile and current / active redo all is lost, it will go automatically apply archived logs, you can achieve maximum recovery;
 
4. recover database until cancel using backup controlfile;
 
 If you lose your current controlfile and current / active redo all lost to redo the old scn to restore the finish. Because there is no application archive log, all data will be lost. 
To understand using backup controlfile recover database, first understanding recover database, that is, without using backup controlfile the case.
In ordinary recover database or recover tablespace, when recover datafile, Oracle will record the current SCN controlfile subject, use the redo log and archive log redo entry, restore the datafile block related to "current controlfile record of the SCN "
And in some cases, Oracle need to restore data to the controlfile than the current record SCN also depends on the position (for example, control file is a backup controlfile, or trace create the controlfile is based.) This time, we need by using backup controlfile. recovery will not be affected by the "current controlfile recorded SCN" restrictions. This time limit will come from your statement (until time, until scn), or available archive log (until cancel) ...

The results are as follows:
If the control file is missing, restore a backup control file, you must use the using backup controlfile option. And until cancel is not fully recovered, ie current / active redo lost or missing files from an archive database after the restore is terminated.

Conclusion:
1, applies to restore old control files, and archive log and cuurrent / active redo all is not lost case. If all archived logs and online log intact, you can not lose data. Database similar Recover
2, current is not lost control file (control file does not need to restore old), then there are log file or current / active log have lost the case, it is terminated. The maximum possible data recovery
3,4: I am in the oracle 10.2.0.4 environmental testing effect is the same, ie to restore old control files, after restoring the control file backup that moment, the system will prompt the application control file backup archive log, if not then stop. The largest possible recovery of data.

 

The results can be drawn, if the old database backup, archive log and online log to save all intact under the circumstances, the use recover database or recover database using backup controlfile. No loss of data
at the backup data file restore if there is, archive logs, or online journals (active, current) situation is lost, you can restore to the previous log file missing

 

just do not fully recover until cancel
require alter database open resetlogs
after the database is open need to understand to do a full backup

 

Online log files are missing:

If normal database, then an error at startup:

SQL> Open the ALTER Database;
the ALTER Open Database
*
Line 1 error:
ORA-00313: unable to open the log group member 1 (for thread 1) of
ORA-00312: online log 1 thread 1:
'C: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ REDO01.LOG '


SQL> Database Open the ALTER RESETLOGS;
the ALTER Open Database RESETLOGS
*
error line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery


SQL> recover database until cancel;
complete media recovery.
SQL> alter database open resetlogs;

Database has changed.

Guess you like

Origin www.cnblogs.com/xibuhaohao/p/11235825.html