發生背景:oracle
搭建11g DG ,備庫rman同步後打開備庫提示以下:app
SQL> alter database open read only;ide
alter database open read onlyui
*rest
ERROR at line 1:日誌
ORA-10458: standby database requires recoveryci
ORA-01152: file 1 was not restored from a sufficiently old backup同步
ORA-01110: data file 1: '/u01/app/oracle/oradata/test/system01.dbf'io
查看備庫日誌,發現一堆Error 12154 received logging on to the standby的報錯test
查詢主庫:
SQL> select dest_name,status,error from v$archive_dest;
dest_name status ERROR
-----------------------------------------------------------------
log_archive_dest_1 valid
log_archive_dest_2 BAD PARAM ORA-12154: TNS:could not resolve the connect identifier specified I could tnsping the STANDBY from production
..................................................................
分析:log_archive_dest_2是用來指向備庫的,負責將歸檔日誌傳到備庫。
最後發現log_archive_dest_2中的service這裏應該和tnsnames中定義的備庫的服務名一致。修改後open備庫正常打開。