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 article mainly introduces the following four typesRestoreMeaning and difference of the method:1. Recover database using backup controlfileItpub personal space \ 6C + L-K3} + m If the current control file is lost, use coldBackupWhen the control file is restored, it is used to tellOracleDo not use the SCN in controlfile as the recovery end point;2. Recover database until cancelIf current/active redo is lost, manually specify the endpoint.3. Recover database using backup controlfile until cancel;If the current controlfile is lost and both current and active Redo are lost, the archived logs are automatically applied to achieve maximum recovery; 4. Recover database until cancel using backup controlfile;If the current controlfile is lost and both current and active Redo are lost, use the SCN in the old redo as the recovery endpoint. Because no application archives logs, all data will be lost. To understand the recover database using backup controlfile, first understand the recover database, that is, there is no using backup controlfile. When a common recover database, recover tablespace, or recover datafile is used, Oracle uses the SCN recorded in the current controlfile as the standard, and uses the redo entry of archive log and redo log, restore the block of the relevant datafile to "SCN recorded in the current controlfile" I. In some cases, oracle needs to restore the data to a back location than the SCN recorded in the current controlfile (for example, the control file is backup controlfile, or the controlfile is created based on trace .), At this time, you need to use using backup controlfile. recovery will not be limited by the "SCN recorded in the current controlfile. At this time, the restrictions come from your statement (until time, until SCN), or the available Archive Log (until cancel )...The result is as follows: If the control file is lost, the using backup controlfile option must be used after the control file of the restore backup. Until cancel is not completely restored, that is, the current/active redo is lost, or an archive file is missing after the Restore database, it is terminated. Conclusion: 1. It is applicable to the old restore control file, and the archive log and cuurrent/active Redo are not lost. If all the archived logs and online logs are in good condition, no data will be lost. Similar to recover Database 2. The current control file is not lost (you do not need to restore the old control file). If archive logs or current/active logs are lost, it is terminated. Maximum possible data recovery 3. 4: I tested the same effect in Oracle 10.2.0.4 environment, that is, the old control file for restore. After the backup of the control file is restored, the system will prompt the archive log after the application control file backup. If not, it will stop. It is also the most likely way to recover data. It can be concluded that if there is an old database backup, the recover database or the recover database using backup controlfile will be used if all the archiving logs and online logs are well saved. No data is lost. If an archived log or an online log (active or current) is lost after the backup data file restore exists, the former archived log can be recovered. Until cancel is not completely restored Need to alter database open resetlogs After opening the database, you need to understand how to make a full-database backup. Online Log File loss: If the database is shut down normally and then started, an error is reported: SQL> alter database open; Alter database open * Row 3 has an error: ORA-00313: Unable to open a member of log group 1 (for thread 1) ORA-00312: Online log 1 thread 1: 'C: \ oracle \ product \ 10.2.0 \ oradata \ orcl \ redo01.log' SQL> alter database open resetlogs; Alter database open resetlogs * Row 3 has an error: ORA-01139: The resetlogs option is valid only after Incomplete Database recovery SQL> recover database until cancel; Media recovery is completed. SQL> alter database open resetlogs; The database has been changed. From: http://blog.163.com/scott_guo/blog/static/1810260832011820112748756/ |