全部博文(6)
分类: Oracle
2013-08-27 09:46:43
做DG的时候 主库两个节点无法把日志传到备库上
SQL> select dest_name,status,type,database_mode,protection_mode,destination,applied_seq#,db_unique_name from v$archive_dest_status; DEST_NAME STATUS TYPE DATABASE_MODE PROTECTION_MODE DESTINATIO APPLIED_SEQ# DB_UNIQUE_NAME ------------------------- --------- ---------- --------------- -------------------- ---------- ------------ ------------------------------ LOG_ARCHIVE_DEST_1 VALID LOCAL OPEN_READ-ONLY MAXIMUM PERFORMANCE +DATA/sharkd 0 sharkdg b/archivel og LOG_ARCHIVE_DEST_2 ERROR UNKNOWN UNKNOWN MAXIMUM PERFORMANCE sharkdb 0 sharkdb
发现 STATUS 非 VALID状态。
select dest_id,error from v$archive_dest;
ORA-16047: DGID mismatch between destination setting and target database
看来没有把日志传过去
查看 ALTER.ORA日志
*** 2013-08-26 11:19:06.319
Archived Log entry 1792 added for thread 1 sequence 902 ID 0xfe904e46 dest 1: /arch/1_902_822142156.dbf
ORA-16055: FAL request rejected
检查 log_archive_dest_2 设置
SQL> show parameter LOG_ARCHIVE_DEST_2 NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ log_archive_dest_2 string service=shardb lgwr sync affirm valid_for=(online_logfiles,primary_role)db_unique_name=sharkdg
查看备库的DB_UNIQUE_NAME 是否有错 果然设置成了SHARKDB了
或查看log_archive_config='DG_CONFIG=()‘
修改了 LOG_ARCHIVE_DEST_2 SCOPE=BOTH 依旧要重启实例 否则好像并不能生效。