Oracle 12c DG備庫啟動報錯standby database requires recovery

ywxj_001發表於2022-02-17

Oracle 12c DG備庫啟動報錯:

SQL> alter database open read only;

alter database open read only

*

ERROR at line 1:

ORA-10458: standby database requires recovery

ORA-01196: file 1 is inconsistent due to a failed media recovery session

ORA-01110: data file 1: '/data/oracle/oradata/WMSPROD/system01.dbf'


原因:備庫丟失歸檔日誌。

ORA-16016: archived log for thread 1 sequence# 4673 unavailable

Recovery interrupted!

Some recovered datafiles maybe left media fuzzy

解決辦法:從主庫複製過來相應的歸檔日誌進行恢復。

1)備庫查詢:SQL>select process,client_process,sequence#,status from v$managed_standby;//定位正在應用的日誌檔案

select max(sequence#) from v$archived_log;

2)主庫查詢:SQL> select process,client_process,sequence#,status from v$managed_standby;//查詢主庫當前寫到的日誌檔案

select max(sequence#) from v$archived_log;

3)對比備庫與主庫之間的待傳輸應用日誌檔案,從主庫複製到備庫歸檔路徑

4)備庫註冊,註冊備庫缺失的最近的歸檔日誌即可

ALTER DATABASE REGISTER PHYSICAL LOGFILE '/u01/app/oracle/archivelog/xxx.dbf' ;

5)備庫應用redo

alter database recover managed standby database disconnect from session;

問題解決。



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

相關文章