恢復備庫 activate standby database 報錯找不到standby redo - ORA-00313

tolywang發表於2016-09-20
從Dataguard做RMAN備份, restore後做恢復, 恢復OK後, alter database open resetlogs報錯,提示控制檔案是standby控制檔案,錯誤碼 ORA-01666 , 查詢解決方法,可以透過alter database activate standby database將資料庫角色(database_role)更改為primary , 同時也會更新控制檔案,但是執行發現報錯 :

SQL> alter database activate standby database; 
alter database activate standby database
*
ERROR at line 1:
ORA-00313: open failed for members of log group 5 of thread 1
ORA-00312: online log 5 thread 1: '+DATA/tb/onlinelog/group_5.782.922899209'
ORA-17503: ksfdopn:2 Failed to open file
+DATA/tb/onlinelog/group_5.782.922899209
ORA-15012: ASM file '+DATA/tb/onlinelog/group_5.782.922899209' does not exist
ORA-00312: online log 5 thread 1: '+DATA/tb/onlinelog/group_5.784.922899209'
ORA-17503: ksfdopn:2 Failed to open file
+DATA/tb/onlinelog/group_5.784.922899209
ORA-15012: ASM file '+DATA/tb/onlinelog/group_5.784.922899209' does not exist 

生成controlfile檔案,檢視到standby redo log檔案是註釋掉的,奇怪為什麼會activate standby 的時候提示找不到這些檔案呢 ? 

透過 
select 'alter database clear logfile group ' ||group# ||';'from v$standby_log;  
select 'alter database drop standby logfile group ' ||group# ||';'from v$standby_log;  
清理掉standby redo log 後,再次執行
SQL> alter database activate standby database;  
成功。 


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-2125197/,如需轉載,請註明出處,否則將追究法律責任。

相關文章