之前做Data Guard 做了一次Switchover切换,之后standby库就报如下错误:
Thu Jul 29 08:03:29 2010
Errors in file /dba/oracle/admin/newccs/udump/newccs_rfs_19602.trc:
ORA-16401: archivelog rejected by RFS
Thu Jul 29 08:03:29 2010
Errors in file /dba/oracle/admin/newccs/bdump/newccs_arc0_19519.trc:
ORA-16401: archivelog rejected by RFS
Thu Jul 29 08:03:33 2010
Media Recovery Log /u01/newccs_archive/1_34801_692846987.dbf
Thu Jul 29 08:05:18 2010
Media Recovery Waiting for thread 1 sequence 34802
Thu Jul 29 08:25:22 2010
RFS[2]: Successfully opened standby log 4: '/u02/oradata/newccs/redo04.log'
Thu Jul 29 08:25:24 2010
Errors in file /dba/oracle/admin/newccs/udump/newccs_rfs_19559.trc:
ORA-16401: archivelog rejected by RFS
Thu Jul 29 08:25:24 2010
Errors in file /dba/oracle/admin/newccs/bdump/newccs_arc1_19521.trc:
ORA-16401: archivelog rejected by RFS
Thu Jul 29 08:25:24 2010
Media Recovery Log /u01/newccs_archive/1_34802_692846987.dbf
Thu Jul 29 08:26:46 2010
Media Recovery Waiting for thread 1 sequence 34803
查询了一下错误代码:
ORA-16401: |
archivelog rejected by RFS |
Cause: |
An attempt was made to re-archive an existing archivelog. This usually happens because either a multiple primary database or standby database(s) or both are trying to archive to this standby database. |
Action: |
See alert log and trace file for more details. No action is necessary; this is an informational statement provided to record the event for diagnostic purposes. |
导致这个错误的原因是重复的归档文件,但是这个不影响对归档文件的Apply,可以忽略这个错误。
虽说可以忽略,但是还是想研究下原因。 检查了相关参数,发现备库的log_archive_dest_2归档目录也设置成了备库。 而且standby_archive_dest参数的位置和log_archive_dest_1也相同。 这个就是导致这个错误的原因。 因为主库先将归档文件放到归档目录,然后备份的log_archive_dest_2也将归档放到这个目录,于是重复,故报错。
根据这个分析有两种解决方法:
(1) 修改log_archive_dest_2 参数
(2) 修改standby_archive_dest参数,如果修改这个参数,还是会产生归档文件,这样还是会占用磁盘空间,所以建议用第一种方法解决。
SQL> show parameter log_archive_dest_
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1 string location=/u01/newccs_archive
log_archive_dest_10 string
log_archive_dest_2 string SERVICE=NEWCCS_ST
log_archive_dest_3 string
SQL> show parameter standby_
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
standby_archive_dest string /u01/newccs_archive
standby_file_management string AUTO
SQL> alter system set log_archive_dest_2='';
System altered.
SQL> show parameter log_archive_dest_
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1 string location=/u01/newccs_archive
log_archive_dest_10 string
log_archive_dest_2 string
log_archive_dest_3 string
log_archive_dest_4 string
log_archive_dest_5 string
log_archive_dest_6 string
log_archive_dest_7 string
log_archive_dest_8 string
log_archive_dest_9 string
SQL>
------------------------------------------------------------------------------