1
SQL>recover database; 該命令用來對所有數據文件進行恢復,只能使用保存在文件系統上的歸檔日志及在線日志。使用此類命令的前提是控制文件不可以是還原或重建得來的。 SQL>recover database until sequence XX;--SQL沒有這樣的寫法,會報錯ORA-00277: illegal option to the UNTIL recovery flag SEQUENCE
2 SQL>recover database using backup controlfile; 該命令用來對所有數據文件及控制文件進行恢復,只能使用保存在文件系統上的歸檔日志及在線日志。
三者關于Specify log: {=suggested | filename | AUTO | CANCEL}提示的區別 RMAN不會有這樣的提示,所以RMAN>recover database until cancel會報錯
SQL>recover database until cancel;會帶出如下Specify log: {=suggested | filename | AUTO | CANCEL}信息
SQL>recover database using backup controlfile;會自動帶出Specify log: {=suggested | filename | AUTO | CANCEL}信息
輸入filename表示輸入具體的歸檔日志進行recover(current redo日志丟失的時候,filename就是對應 current redo日志的路徑),如下案例85提示顯示為歸檔日志,但是current redo日志,所以輸入/db/oracle/oradata/PROD1/redo01.log 輸入AUTO表示主動recover直到最后一個歸檔日志 SQL> recover database until cancel; ORA-00279: change 2292679 generated at 07/31/2017 14:26:21 needed for thread 1 ORA-00289: suggestion : /db/oracle/fast_recovery_area/PROD1/archivelog/2017_07_31/o1_mf_1_85_%u_.arc ORA-00280: change 2292679 for thread 1 is in sequence #85
Specify log: {=suggested | filename | AUTO | CANCEL} /db/oracle/oradata/PROD1/redo01.log ORA-00308: cannot open archived log '/db/oracle/oradata/PROD1/redo01.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3
Specify log: {=suggested | filename | AUTO | CANCEL} AUTO ORA-00308: cannot open archived log '/db/oracle/fast_recovery_area/PROD1/archivelog/2017_07_31/o1_mf_1_85_%u_.arc' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3