ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Data Guard无法同步报ORA-16047错

Data Guard无法同步报ORA-16047错

原创 Linux操作系统 作者:beatony 时间:2012-11-15 16:50:11 0 删除 编辑
一、问题现象

Data Guard无法正常同步,alert log错误信息如下:

LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_2

Error for archive log file 4 to 'tmpeps'

Errors in file /hp/app/oracle/rdbms/diag/rdbms/eps/eps/trace/eps_nsa3_1008.trc:

ORA-16047: DGID mismatch between destination setting and target database

FALserver, ARC3: Error 16047 creating remote archivelog file 'tmpeps'

FALserver, ARC3: FAL archive failed, see trace file.

ARCH: FAL archive failed. Archiver continuing

ORACLE Instance eps - Archival Error. Archiver continuing.

二、原因分析

出现这个错误主要有以下两个原因造成:

(1)主库的Log_archive_desc_n参数中db_unique_name的设置与备库的db_unique_name不匹配

(2)Log_archive_config 参数中Dg_config未设置或者是未包含主备库的db_unique_name

具体处理步骤如下:

关于第一种可能性,检查如下:

1、检查主库log_archive_dest_3的参数设置

Show parameter log_archive_dest_3

Name           type          value

----------------          ------------------

Log_archive_dest_3  string   service=tmpeps LGWR ASYNC NOAFFIRM valid_for=(online_logfiles,primary_role)db_unique_name=tmpeps

2、检查备库的db_unique_name参数设置

Show parameter db_unique_name

 Name          type          value

----------------        ----------------

db_unique_name  string         tmpeps

    两者匹配,因此不是这个原因造成

关于第二种可能性,检查如下:

1、检查主库log_archive_config参数设置

Show parameter log_archive_config

Name           type          value

----------------        ----------------

Log_archive_config   string     DG_CONFIG=(eps,tmpeps)

2、检查主库db_unique_name参数设置

    Show parameter db_unique_name

 Name          type          value

----------------        ----------------

db_unique_name  string     eps

3、检查备库的db_unique_name参数

    Show parameter db_unique_name

 Name          type          value

----------------        -------------------

db_unique_name  string         tmpeps

4、检查备库的log_archive_config参数

Show parameter

      Name            type          value

----------------        -----------------

log_archive_config  string        

 发现这里没有设置log_archive_config参数,以下为这个参数的官方解释:

LOG_ARCHIVE_CONFIG enables or disables the sending of redo logs to remote destinations and the receipt of remote redo logs, and specifies the unique database names (DB_UNIQUE_NAME) for each database in the Data Guard configuration.

Values:

DG_CONFIG

Specifies a list of up to 9 unique database names (defined with the DB_UNIQUE_NAME initialization parameter) for all of the databases in the Data Guard configuration.

NODG_CONFIG

Eliminates the list of service provider names previously specified with the DG_CONFIG option.

这个参数如果设置了,就要在Data Guard环境中所有的数据库都设置

三、解决方法

由于备库没有设置log_archive_config参数,导致了主库无法与备库进行同步,设置这个参数后,主备同步正常

alter system set log_archive_config="DG_CONFIG=(eps,seps,tmpeps)" scope=both;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22578826/viewspace-749297/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: sqlplus 内部命令
请登录后发表评论 登录
全部评论

注册时间:2010-05-18

  • 博文量
    192
  • 访问量
    495748