SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL> show parameter log_archive_config
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_config string DG_CONFIG=(orclpri,orclstdby1,orclstdby2)
Dataguard做swithover后,分别检查主库,备库alert*.log 发现下述日志
主库日志:
Fri Dec 30 01:24:07 2011
RFS[3]: Assigned to RFS process 9814
RFS[3]: Database mount ID mismatch [0x6bfb9955:0x6bfbcec9] (1811650901:1811664585)
RFS[3]: Client instance is standby database instead of primary
RFS[3]: Not using real application clusters
备库日志
Fri Dec 30 01:20:03 2011
PING[ARC2]: Heartbeat failed to connect to standby 'orclpri'. Error is 16009.
检查orclstdby1发现log_archive_dest_2设置错误,清空log_archive_dest_2设置后问题解决。
日志可以正常从主库同步到备份库。
alter system set log_archive_dest_2 = '';
或者将备库的log_archive_dest_2设置为VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) 也可。
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=orclstdby1 ARCH ASYNC VALID_FOR=(ALL_LOGFILES,ALL_ROLES) db_unique_name=orclstdby1';