有一个库,在主库添加了一个tora10g的配置,发现原来已经存在的rora10g和lora10g都发生了异常,不再继续传日志。检查v$archive_dest显示status为BAD PARAM,error为:ORA-16053 DB_UNIQUE_NAME is not in the Data Guard Configuration:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
SQL> select dest_id, status, destination, error from v$archive_dest; DEST_NAME DESTINATION STATUS ERROR ------------------------------ -------------------------------------------------- --------- ----------------------------------------------------------------- LOG_ARCHIVE_DEST_1 USE_DB_RECOVERY_FILE_DEST VALID LOG_ARCHIVE_DEST_2 rora10g BAD PARAM ORA-16053: DB_UNIQUE_NAME is not in the Data Guard Configuration LOG_ARCHIVE_DEST_3 lora10g BAD PARAM ORA-16053: DB_UNIQUE_NAME is not in the Data Guard Configuration LOG_ARCHIVE_DEST_4 tora10g BAD PARAM ORA-16053: DB_UNIQUE_NAME is not in the Data Guard Configuration LOG_ARCHIVE_DEST_5 INACTIVE LOG_ARCHIVE_DEST_6 INACTIVE LOG_ARCHIVE_DEST_7 INACTIVE LOG_ARCHIVE_DEST_8 INACTIVE LOG_ARCHIVE_DEST_9 INACTIVE LOG_ARCHIVE_DEST_10 INACTIVE 10 rows selected. |
但是db_unique_name都是设置正确的。
解决方法:重置一次那些BAD PARAM的log_archive_dest_state_n:
1 2 3 4 5 6 7 8 9 |
alter system set log_archive_dest_state_2 =''; alter system set log_archive_dest_state_2 ='SERVICE=rora10g lgwr async noaffirm reopen=60 valid_for=(online_logfiles,primary_role) db_unique_name=rora10g'; alter system set log_archive_dest_state_3 =''; alter system set log_archive_dest_state_3 ='SERVICE=lora10g LGWR ASYNC noaffirm reopen=60 VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=lora10g'; alter system set log_archive_dest_state_4 =''; alter system set log_archive_dest_4='SERVICE=tora10g LGWR ASYNC noaffirm reopen=60 VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=tora10g'; |