SQL> alter database open read only;
alter database open read only
*
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/Oracle/oradata/BSTYLE/system.309.766573511'
alter.log有報錯
Error 12154 received logging on to the standby
發生背景:
做dataguard,備庫RMAN同步後alter database open read only發現起不來。rman過程並沒有報錯,啟動備庫的時候看alter.log有一堆Error 12154 received logging on to the standby,再看主庫alter.log,也有一堆Error 12154 received logging on to the standby
這說明什麼呢,說明archivelog歸檔到備庫的路徑是失敗的,歸檔不成功!但是主庫sqlplus連備庫,或備庫串連主庫都是正常的!為什麼歸檔不行呢?
SQL> select error from v$archive_dest;
ERROR
-----------------------------------------------------------------
ORA-12154: TNS:could not resolve the connect identifier specified
I could tnsping the STANDBY from production
Dataguard中archive_dest_2是用來指向備庫的,負責將歸檔日誌傳到備庫,檢查配置參數
注意dest_2中service=這裡應該和tnsnames中定義備庫的是一樣的,如。
我這裡就是因為設定的不一樣導致歸檔傳出過去。改成一樣的後一切OK!!!
相關參考:
Oracle Data Guard 重要配置參數
基於同一主機配置 Oracle 11g Data Guard
探索Oracle之11g DataGuard
Oracle Data Guard (RAC+DG) 歸檔刪除策略及指令碼
Oracle Data Guard 的角色轉換
Oracle Data Guard的日誌FAL gap問題
Oracle 11g Data Guard Error 16143 Heartbeat failed to connect to standby 處理方法