recover database until cancel  using backup controlfile;
recover database  using backup controlfile;   这两条SQL有啥区别啊 高人们

解决方案 »

  1.   

    Begin cancel-based recovery by issuing the following command:RECOVER DATABASE UNTIL CANCEL
    If you are using a backup control file with this incomplete recovery, then specify the USING BACKUP CONTROLFILE option in the RECOVER command.RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE
    Note:If you fail to specify the UNTIL clause on the RECOVER command, then the database assumes a complete recovery and will not open until all redo is applied.
    The database applies the necessary redo log files to reconstruct the restored datafiles. The database supplies the name it expects to find from LOG_ARCHIVE_DEST_1 and requests you to stop or proceed with applying the log file. Note that if the control file is a backup, then you must supply the names of the online logs if you want to apply the changes in these logs.Note:If you use a Real Application Clusters (RAC) configuration, and you are performing incomplete recovery or using a backup control file, then the database can only compute the name of the first archived redo log file from the first thread. The first redo log file from the other threads must be supplied by the user. After the first log file in a given thread has been supplied, the database can suggest the names of the subsequent log files in this thread.
    Continue applying redo log files until the last log has been applied to the restored datafiles, then cancel recovery by executing the following command:CANCEL
    The database indicates whether recovery is successful. If you cancel before all the datafiles have been recovered to a consistent SCN and then try to open the database, you will get an ORA-1113 error if more recovery is necessary. As explained in "Determining Which Datafiles Require Recovery", you can query V$RECOVER_FILE to determine whether more recovery is needed, or if a backup of a datafile was not restored prior to starting incomplete recovery.
      

  2.   

    recover database until cancel  using backup controlfile;
    表示
     如果 丢失当前controlfile并且current/active redo都丢失,以旧的redo中的scn为恢复终点。因为没有应用归档日志,所有会丢失数据。recover database  using backup controlfile;
    表示
     如果丢失丢失当前控制文件,用冷备份中的控制文件恢复的时候。用来告诉oracle,不要以controlfile中的scn作为恢复的终点;