oracle10g RAC ora-12545因目标主机或对象不存在的错误解决
发表于:2026-11-02 作者:千家信息网编辑
千家信息网最后更新 2026年11月02日,由于历史原因,应用升级需要成本,最近新上了一套oracle 10g RAC (10.2.0.5),测试时,从其他应用服务器,链接这套数据库,使用的是vip链接,发现大量报错,报错为ora-12545因
千家信息网最后更新 2026年11月02日oracle10g RAC ora-12545因目标主机或对象不存在的错误解决由于历史原因,应用升级需要成本,最近新上了一套oracle 10g RAC (10.2.0.5),测试时,从其他应用服务器,链接这套数据库,使用的是vip链接,发现大量报错,报错为ora-12545因目标主机或对象不存在。
ORA-12545: Connect failed because target host or object does not exist
查询网上资料和mos文档,
导致这个问题的原因
Whe LOCAL_LISTENER is not set at all or is not set correctly, PMON can register both the VIP hostname and the physical hostname with the REMOTE_LISTENER. This is incorrect in RAC but if it does occur, the client can intermittently be routed to a listener endpoint on either of these addresses. If the client is unable to resolve the physical hostname or even the vip hostname, the connection will fail with ORA-12545.
由于LOCAL_LISTENER未配置或者配置不争取,PMON进程使用的是REMOTE_LISTENER注册vip hostname和物理地址,在rac里面,这是不对的配置,客户端无法使用这些地址正确路由到监听服务器。如果客户端无法正确解析物理地址或者vip的hostname,链接就会报 ORA-12545错误。
Additionall, if the VIP hostname cannot be resolved, but the VIP numerical address is reachable; then this VIP numerical address should be used as the HOST value for LOCAL_LISTENER instead.
And important first set is to check the output for : lsnrctl services
You should not see the physical hostname in the handler information for your RAC instances. Here's an example of an incorrect lsnrctl services output for a 2-node RAC cluster:
lsnrctl services oracle_rac_listener
Service "oracle.oracle.com" has 2 instance(s).
Instance "orcl1", status READY, has 2 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=myphysicalhost1)(PORT=1521))
"DEDICATED" established:326 refused:0 state:ready
LOCAL SERVER
Instance "orcl2", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:394371 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=myphysicalhost2)(PORT=1521))
Here's an example of what it ought to look like when LOCAL_LISTENER is configured correctly:
lsnrctl services oracle_rac_listener
Service "oracle.oracle.com" has 2 instance(s).
Instance "orcl1", status READY, has 2 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=myVIP_host1)(PORT=1521))
"DEDICATED" established:326 refused:0 state:ready
LOCAL SERVER
Instance "orcl2", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:394371 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=myVIP_host2)(PORT=1521))
解决方案:
分别修改两边的RAC实例的LOCAL_LISTENER配置。
alter system set LOCAL_LISTENER="(address=(protocol=tcp)(port=1521)(host=))" scope=both sid='INSTANCE_NAME1';
alter system set LOCAL_LISTENER="(address=(protocol=tcp)(port=1521)(host=))" scope=both sid='INSTANCE_NAME2';
另外,相关配置REMOTE_LISTENER.
alter system set REMOTE_LISTENER='' scope=both sid='*';
另外parallel_instance_group参数也可以配置不一样的值
alter system set parallel_instance_group="A" scope=both sid='INSTANCE_NAME1';
alter system set parallel_instance_group="B" scope=both sid='INSTANCE_NAME2';
最后,注意的是,修改完后,重启监听,如果重启监听都不行,重启一下数据库或者两个实例重启一下。
ORA-12545: Connect failed because target host or object does not exist
查询网上资料和mos文档,
导致这个问题的原因
Whe LOCAL_LISTENER is not set at all or is not set correctly, PMON can register both the VIP hostname and the physical hostname with the REMOTE_LISTENER. This is incorrect in RAC but if it does occur, the client can intermittently be routed to a listener endpoint on either of these addresses. If the client is unable to resolve the physical hostname or even the vip hostname, the connection will fail with ORA-12545.
由于LOCAL_LISTENER未配置或者配置不争取,PMON进程使用的是REMOTE_LISTENER注册vip hostname和物理地址,在rac里面,这是不对的配置,客户端无法使用这些地址正确路由到监听服务器。如果客户端无法正确解析物理地址或者vip的hostname,链接就会报 ORA-12545错误。
Additionall, if the VIP hostname cannot be resolved, but the VIP numerical address is reachable; then this VIP numerical address should be used as the HOST value for LOCAL_LISTENER instead.
And important first set is to check the output for : lsnrctl services
You should not see the physical hostname in the handler information for your RAC instances. Here's an example of an incorrect lsnrctl services output for a 2-node RAC cluster:
lsnrctl services oracle_rac_listener
Service "oracle.oracle.com" has 2 instance(s).
Instance "orcl1", status READY, has 2 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=myphysicalhost1)(PORT=1521))
"DEDICATED" established:326 refused:0 state:ready
LOCAL SERVER
Instance "orcl2", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:394371 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=myphysicalhost2)(PORT=1521))
Here's an example of what it ought to look like when LOCAL_LISTENER is configured correctly:
lsnrctl services oracle_rac_listener
Service "oracle.oracle.com" has 2 instance(s).
Instance "orcl1", status READY, has 2 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=myVIP_host1)(PORT=1521))
"DEDICATED" established:326 refused:0 state:ready
LOCAL SERVER
Instance "orcl2", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:394371 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=myVIP_host2)(PORT=1521))
解决方案:
分别修改两边的RAC实例的LOCAL_LISTENER配置。
alter system set LOCAL_LISTENER="(address=(protocol=tcp)(port=1521)(host=))" scope=both sid='INSTANCE_NAME1';
alter system set LOCAL_LISTENER="(address=(protocol=tcp)(port=1521)(host=))" scope=both sid='INSTANCE_NAME2';
另外,相关配置REMOTE_LISTENER.
alter system set REMOTE_LISTENER='' scope=both sid='*';
另外parallel_instance_group参数也可以配置不一样的值
alter system set parallel_instance_group="A" scope=both sid='INSTANCE_NAME1';
alter system set parallel_instance_group="B" scope=both sid='INSTANCE_NAME2';
最后,注意的是,修改完后,重启监听,如果重启监听都不行,重启一下数据库或者两个实例重启一下。
配置
地址
链接
监听
原因
实例
客户
客户端
数据
数据库
服务器
物理
应用
服务
主机
对象
目标
错误
不对
不行
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
什么是科技互联网
互联网新科技
哈尔滨大商圈互联网科技有限公司
互联网科技产业
蓝思科技飞鸽互联网
圆梦互联网科技
互联网科技卖菜
北京互联网科技有限公司
碳银互联网科技
天津摩尔互联网科技
奇士达互联网科技
互联网科技股午盘股票涨跌
太原新华互联网科技学校怎么样
科技互联网的估值
彤创互联网科技有限公司
哈尔滨屹滨互联网科技有限公司
江苏苏星互联网科技有限公司
互联网科技实习生岗位
艺电能源互联网科技有限公司招聘
西安左小互联网科技有限公司
喔噻互联网科技有限公司
科技互联网产品
互联网络科技有限公司
平安科技 互联网
善班互联网科技
互联网科技媒体
佰商互联网科技有限公司
银川新华互联网科技学校地址
特约风豹互联网科技为什么扣费
济南有互联网科技公司吗