最近在安装并测试Oracle 11G Datagurad,搭建安装了测试系统,并且配置完毕,但是出现了ora-16047的问题,简单描述环境:
主库:hunter SID:hunter db_name=hunter db_unique_name=hunter service=hunter
被库:hunterdg SID:hunterdg db_name=hunter db_unique_name=hunterdg service=hunterdg
报错问题:
PING[ARC2]: Heartbeat failed to connect to standby ‘hunterdg‘. Error is 16047. Fri Jun 05 10:42:10 2015 PING[ARC2]: Heartbeat failed to connect to standby ‘hunterdg‘. Error is 16047. Fri Jun 05 10:43:10 2015 PING[ARC2]: Heartbeat failed to connect to standby ‘hunterdg‘. Error is 16047. Fri Jun 05 10:44:10 2015 PING[ARC2]: Heartbeat failed to connect to standby ‘hunterdg‘. Error is 16047. Fri Jun 05 10:45:10 2015 PING[ARC2]: Heartbeat failed to connect to standby ‘hunterdg‘. Error is 16047. Fri Jun 05 10:46:10 2015 PING[ARC2]: Heartbeat failed to connect to standby ‘hunterdg‘. Error is 16047. Fri Jun 05 10:47:10 2015 PING[ARC2]: Heartbeat failed to connect to standby ‘hunterdg‘. Error is 16047. Fri Jun 05 10:48:11 2015 PING[ARC2]: Heartbeat failed to connect to standby ‘hunterdg‘. Error is 16047. Fri Jun 05 10:49:11 2015 PING[ARC2]: Heartbeat failed to connect to standby ‘hunterdg‘. Error is 16047. Fri Jun 05 10:50:11 2015 PING[ARC2]: Heartbeat failed to connect to standby ‘hunterdg‘. Error is 16047. Fri Jun 05 10:51:11 2015 PING[ARC2]: Heartbeat failed to connect to standby ‘hunterdg‘. Error is 16047. 查询主库的参数如下: SQL> show parameter db_unique_name; NAME TYPE ------------------------------------ ---------------------- VALUE ------------------------------ db_unique_name string hunter SQL> show parameter log_archive_dest_2; NAME TYPE ------------------------------------ ---------------------- VALUE ------------------------------ log_archive_dest_2 string SERVICE=hunterdg lgwr sync val id_for=(online_logfile,primary _role) DB_UNIQUE_NAME=hunter 查询被库参数如下:
SQL> show parameter db_unique_name; NAME TYPE ------------------------------------ ---------------------- VALUE ------------------------------ db_unique_name string hunterdg SQL> show parameter log_archive_dest_2; NAME TYPE ------------------------------------ ---------------------- VALUE ------------------------------ log_archive_dest_2 string SERVICE=hunter lgwr sync valid _for=(online_logfile,primary_r ole) DB_UNIQUE_NAME=hunterdg
经过查询资料如下:
log_archive_dest_2=‘service=PRIMARYDB async valid_for=(online_logfile,primary_role) db_unique_name=PRIMARYDB‘#被库参数设置
经过查询资料如下:
log_archive_dest_1=‘service=STANDBYDB async valid_for=(online_logfile,primary_role) db_unique_name=STANDBYDB‘#主库参数设置
被库修改
SQL> alter system set log_archive_dest_2=‘service=hunter async valid_for=(online_logfile,primary_role) db_unique_name=hunter‘ scope=both; System altered.
主库修改
SQL> alter system set log_archive_dest_2=‘service=hunterdg async valid_for=(online_logfile,primary_role) db_unique_name=hunterdg‘ scope=both; System altered.
当修改完两个节点参数时候,查看主库alter*.log如下:
ALTER SYSTEM SET log_archive_dest_2=‘service=hunterdg async valid_for=(online_logfile,primary_role) db_unique_name=hunterdg‘ SCOPE=BOTH; Fri Jun 05 10:54:54 2015 Destination LOG_ARCHIVE_DEST_2 no longer supports SYNCHRONIZATION Thread 1 advanced to log sequence 108 (LGWR switch) Current log# 6 seq# 108 mem# 0: /u01/app/oracle/oradata/hunter/redo06a.log Current log# 6 seq# 108 mem# 1: /u01/app/oracle/oradata/hunter/redo06b.log ****************************************************************** LGWR: Setting ‘active‘ archival for destination LOG_ARCHIVE_DEST_2 ****************************************************************** Fri Jun 05 10:54:55 2015 Archived Log entry 210 added for thread 1 sequence 107 ID 0x1987dbc0 dest 1: LNS: Standby redo logfile selected for thread 1 sequence 108 for destination LOG_ARCHIVE_DEST_2 Fri Jun 05 10:54:57 2015 ARC0: Standby redo logfile selected for thread 1 sequence 107 for destination LOG_ARCHIVE_DEST_2
证明参数设置正确,并且开始传输redolog了。
本文出自 “freedom” 博客,谢绝转载!
原文地址:http://zhaoguohui.blog.51cto.com/3923573/1658818