11.2.0.1配置DATAGUARD遭遇ORA-12514

简介: 今天同事配置了一套DATAGUARD但是配置好后备库没有RFS进程,查看日志报错 Error 12154 connecting to destination LOG_ARCHIVE_DEST_2 standby host 'bossdbd' Error 1...
今天同事配置了一套DATAGUARD但是配置好后备库没有RFS进程,查看日志报错
Error 12154 connecting to destination LOG_ARCHIVE_DEST_2 standby host 'bossdbd'
Error 12154 attaching to destination LOG_ARCHIVE_DEST_2 standby host 'bossdbd'
ORA-12154: TNS:could not resolve the connect identifier specified 
既然是报12154那么一般说明是TNSNAMES.ORA里面的配置不对的。但是奇怪的是,我使用
sqlplus sys/***@bossdbd 连接备库是没有问题。这就说明TNSNAMES.ORA配置没有问题。
考虑到11.2.0.1是比较低的版本,以前配置11.2.0.3并没有这个问题,可能是BUG。随机查询文档,在MOS上查到如下:

Adding an new Standby fails with error Ora-12154: TNS:could not resolve the connect identifier specified (文档 ID 1240558.1)
Oracle Database - Enterprise Edition - Version 9.0.1.0 to 11.2.0.1 [Release 9.0.1 to 11.2]

After adding a new standby database, a corresponding new TNS alias entry was added to the tnsnames.ora on the primary node, but neither the instance nor the archiver processes were restarted.

The ARC processes read the tnsnames.ora only once during process initialization, any updates to the tnsnames.ora after startup will not be known to the ARC process and hence the error
ORA-12154: TNS:could not resolve the connect identifier specified
is reported when the ARC processes try to resolve the (new) value for the 'service' attribute.


解决方法如下:

1. Shutdown and restart the primary database instance.

This will cause a (short) outage of the primary database and may not be feasible for this reason.

2. Use a connect descriptor for the 'service' parameter.


Instead of using a TNS alias for the service parameter (which requires a lookup of the tnsnames.ora file) one can use the connect descriptor itself.

Assume the following (new) entry in the tnsnames.ora on the primary node:

REMOTE_DEST_NEW = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = standbynode)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = STDBY) ) ) 


The corresponding 'alter system' command would then be:

alter system set log_archive_dest_2 = 'service="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=standbynode)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=STDBY)))"' ;


Please note that there's a length limit for the log_archive_dest_ parameter, so this will only work if the length of the connect string plus the length of other attributes specified does not exceed this limit.

3. Kill the ARC processes of the primary instance.


With RDBMS releases However these commands are no longer valid with 10g and above, so to cause a respawn of the archiver processes they must be killed, they will be restarted immediately by the instance.

This solution requires due care to avoid accidentally killing other vital background processes.

The following script (ksh,bash) may assist in identifying the correct ARC processes that need to be killed:

ps -ef|egrep "ora_arc.*_${ORACLE_SID}"|grep -v grep |while read user pid junk
do
 echo "kill -9 $pid"
done

记录一下。
相关文章
|
SQL 监控 Oracle
Oracle 数据库发生等待事件:enq: TX - row lock contention ,排查思路
Oracle 数据库发生等待事件:enq: TX - row lock contention ,排查思路
Oracle 数据库发生等待事件:enq: TX - row lock contention ,排查思路
|
10月前
|
人工智能 安全 机器人
【喂奶级教程】手把手教你阿里云部署OpenClaw,让AI助手在聊天软件里帮你干活
2026年的AI自动化领域,OpenClaw(原Clawdbot、Moltbot)凭借**自然语言驱动执行、本地+云端双适配、插件化生态扩展**的核心能力,成为个人与企业打造专属AI助手的标杆工具。它彻底打破了传统对话式AI“只说不做”的局限,以WebSocket网关为核心架构,能安全执行系统命令、操作文件、控制浏览器、对接多端办公工具,真正实现“一句话搞定所有重复性工作”。阿里云作为国内领先的云服务平台,对OpenClaw完成了全生态整合,推出**专属预置镜像、轻量应用服务器一键部署、百炼大模型无缝对接**等优化方案,将原本需要专业开发能力的部署流程,简化为零基础用户也能轻松上手的“点选+复
1155 0
|
Oracle 关系型数据库 数据库
手把手教你Oracle DataGuard主备切换(switchover)
手把手教你Oracle DataGuard主备切换(switchover)
2730 4
|
7月前
|
SQL 缓存 关系型数据库
主从延迟的5大“元凶”+3个排查命令,别再让从库拖后腿
数据库小学妹详解MySQL主从延迟:5大元凶(硬件弱、写压大、慢查询、网络差、大事务)+3条核心排查命令(SHOW SLAVE STATUS等),助你快速定位、精准优化,避坑生产故障!
|
Oracle Ubuntu Java
cannot execute binary jdk问题
【7月更文挑战第15天】
1826 5
|
SQL 关系型数据库 MySQL
实时计算 Flink版产品使用合集之使用 MySQL CDC 进行数据同步时,设置 server_id 参数如何解决
实时计算Flink版作为一种强大的流处理和批处理统一的计算框架,广泛应用于各种需要实时数据处理和分析的场景。实时计算Flink版通常结合SQL接口、DataStream API、以及与上下游数据源和存储系统的丰富连接器,提供了一套全面的解决方案,以应对各种实时计算需求。其低延迟、高吞吐、容错性强的特点,使其成为众多企业和组织实时数据处理首选的技术平台。以下是实时计算Flink版的一些典型使用合集。
|
关系型数据库 Linux 数据库
在CentOS 7上安装和使用PostgreSQL的方法
在CentOS 7上安装和使用PostgreSQL的方法
2843 0
|
SQL 关系型数据库 MySQL
mysql从库SHOW SLAVE STATUS字段详解
mysql从库SHOW SLAVE STATUS字段详解
1418 0

热门文章

最新文章