PING[ARC2]: Heartbeat failed to connect to standby 'gqtzdb_dg'. Error is 16047

Posted 会飞的板儿

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PING[ARC2]: Heartbeat failed to connect to standby 'gqtzdb_dg'. Error is 16047相关的知识,希望对你有一定的参考价值。

  Data Guard搭建完毕之后,执行开启归档路径2,结果发现不同步,

SQL> alter system set log_archive_dest_state_2=enable;

  查看错误日志,发现有PING[ARC2]: Heartbeat failed to connect to standby ‘gqtzdb_dg‘. Error is 16047.的报错:

[[email protected] trace]$ tail -100f alert_gqtzdb.log 
Mon Jul 03 18:19:10 2017
Using STANDBY_ARCHIVE_DEST parameter default value as /oradata/gqtzdb/archivelog
ALTER SYSTEM SET log_archive_dest_state_2=‘ENABLE‘ SCOPE=BOTH;
Mon Jul 03 18:19:10 2017
PING[ARC2]: Heartbeat failed to connect to standby ‘gqtzdb_dg‘. Error is 16047.

  接着查看v$archive_dest视图,查看是否能找到原因,结果发现如下报错:

SQL> select dest_id,error from v$archive_dest;

   DEST_ID ERROR
---------- -----------------------------------------------------------------
         1
         2 ORA-16047: DGID mismatch between destination setting and target
           database

  很明显,DGID不一样,去备库查看参数db_unique_name参数:

SQL> show parameter db_unique_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                       string      gqtzdb

  发现db_unique_name参数没有修改,仍然是主库的值,速度改过来,并重启备库:

SQL> alter system set db_unique_name=‘gqtzdb_dg‘ scope=both;
alter system set db_unique_name=‘gqtzdb_dg‘ scope=both
                 *
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified


SQL> alter system set db_unique_name=‘gqtzdb_dg‘ scope=spfile;

System altered.

  然后再在主库开启归档路径2,在备库运行命令,查看同步状态:

SQL> alter database recover managed standby database using current logfile disconnect from session;

Database altered.

SQL> select process,client_process,sequence#,status from v$managed_standby;

PROCESS   CLIENT_P  SEQUENCE# STATUS
--------- -------- ---------- ------------
ARCH      ARCH              0 CONNECTED
ARCH      ARCH              0 CONNECTED
ARCH      ARCH              0 CONNECTED
ARCH      ARCH              0 CONNECTED
RFS       UNKNOWN           0 IDLE
RFS       LGWR             24 IDLE
RFS       UNKNOWN           0 IDLE
RFS       UNKNOWN           0 IDLE
MRP0      N/A              11 APPLYING_LOG

9 rows selected.

 

以上是关于PING[ARC2]: Heartbeat failed to connect to standby 'gqtzdb_dg'. Error is 16047的主要内容,如果未能解决你的问题,请参考以下文章

心跳包(HeartBeat)

如何在 arc2earth 中使用谷歌地图 api v3?

部署Heartbeat--Elastic Stack之十一

ELK之使用heartbeat监控WEB站点

高可用集群之heartbeat安装配置

Java 内部类扩展了外部类