今日在進行數據庫恢復時,遭遇RMAN-06564錯誤,如下:
RMAN> restore spfile from autobackup; Starting restore at 01-NOV-16 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=100 device type=DISK RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 11/01/2016 10:33:51 RMAN-06564: must use the TO clause when the instance is started with SPFILE
出現RMAN-06564錯誤碼,說明數據庫已經使用SPFILE啟動,在恢復SPFILE時就不能恢復到默認位置,因此rman要求通過to語句指定到其他位置,故解決辦法如下:
RMAN> restore spfile to '/tmp/spfile_sid.ora' from autobackup; Starting restore at 01-NOV-16 using channel ORA_DISK_1 channel ORA_DISK_1: looking for AUTOBACKUP on day: 20161101 channel ORA_DISK_1: AUTOBACKUP found: /u03/OTWB/20161030/ctl_spfile_c-2994357560-20161101-00 channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u03/OTWB/20161030/ctl_spfile_c-2994357560-20161101-00 channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete Finished restore at 01-NOV-16
OK,問題已經解決。為了避免這樣的錯誤,以后最好還是用pfile啟動到nomount狀態會比較好。
