11g默认valid_for引起ora-16009
dg的alert总是间断的出现ora-16009的错误
主库:
Sun Feb 17 03:34:52 2013 RFS[53]: Assigned to RFS process 6896 RFS[53]: Database mount ID mismatch [0x27bfa217:0x27c019ed] (666870295:666900973) RFS[53]: Client instance is standby database instead of primary RFS[53]: Not using real application clusters Errors in file /db/app/oracle/diag/rdbms/xiaoyu/xiaoyu/trace/xiaoyu_rfs_6896.trc: ORA-16009: invalid redo transport destination Sun Feb 17 03:40:52 2013 RFS[54]: Assigned to RFS process 6942 RFS[54]: Database mount ID mismatch [0x27bfa217:0x27c019ed] (666870295:666900973) RFS[54]: Client instance is standby database instead of primary RFS[54]: Not using real application clusters Errors in file /db/app/oracle/diag/rdbms/xiaoyu/xiaoyu/trace/xiaoyu_rfs_6942.trc: ORA-16009: invalid redo transport destination备库
Sun Feb 17 03:34:52 2013 Errors in file /orcl11g/app/oracle/diag/rdbms/xiaoyu_dg/xiaoyu/trace/xiaoyu_arc2_3042.trc: ORA-16009: invalid redo transport destination PING[ARC2]: Heartbeat failed to connect to standby 'xiaoyu'. Error is 16009. Sun Feb 17 03:40:52 2013 Errors in file /orcl11g/app/oracle/diag/rdbms/xiaoyu_dg/xiaoyu/trace/xiaoyu_arc2_3042.trc: ORA-16009: invalid redo transport destination PING[ARC2]: Heartbeat failed to connect to standby 'xiaoyu'. Error is 1600主库
SQL> show parameter log_archive_dest;NAME TYPE VALUE
------------------------------------ ----------- ------------------------------ log_archive_dest_1 string location=/orclbak/xiaoyulog_archive_dest_2 string service=xiaoyu_dg arch sync d
b_unique_name=xiaoyu_dgSQL> select dest_name,error,status,process from v$archive_dest where rownum<3;
DEST_NAME ERROR STATUS PROCESS
-------------------- -------------------- --------- ---------- LOG_ARCHIVE_DEST_1 VALID ARCH LOG_ARCHIVE_DEST_2 VALID ARCH备库:
SQL> show parameter log_archive_dest;NAME TYPE VALUE
------------------------------------ ----------- ------------------------------ log_archive_dest_1 string location=/orclbak/xiaoyudglog_archive_dest_2 string service=xiaoyu arch sync d
b_unique_name=xiaoyuSQL> select dest_name,error,status,process from v$archive_dest where rownum<3;
DEST_NAME ERROR STATUS PROCESS
---------- -------------------- --------- ---------- LOG_ARCHIV VALID ARCH E_DEST_1LOG_ARCHIV ORA-16009: invalid ERROR ARCH
E_DEST_2 redo transport destination需要这里说明的是11g这个ora-16009 invalid redo transport destination并没有影响dg体系结构的运行,而这个错误也是反映在备库的v$archive_dest下,这个因为 log_archive_dest_2参数不规范引起的,默认不设置valid_for属性oracle认为是VALID_FOR= (ALL_LOGFILES, ALL_ROLES)。
SQL> alter system set log_archive_dest_2='service=xiaoyu arch sync valid_for=(online_logfiles,primary_role) db_unique_name=xiaoyu';
System altered.
手动设置valid_for属性后主库做几次switch logfile,备库的v$archive_dest和alert没有出现上述的错误,建议按照dg的官档推荐指定log_archive_dest等参数属性。
SQL> select dest_name,error,status,process from v$archive_dest where rownum<3;DEST_NAME ERROR STATUS PROCESS -------------------- -------------------- --------- ---------- LOG_ARCHIVE_DEST_1 VALID ARCH LOG_ARCHIVE_DEST_2 VALID ARCH