9I RAC环境下客户端连接时连服务名不一定成功问题

客户端用INSTANCE NAME 连接正常,用SERVICE NAME连接有错;如果仅开一台则无论怎么连都正常。

在服务器本机怎么连都正常。

问题号:  ORA- 12545   Connect failed because target host or object does not exist

The information in this article applies to:

Oracle Net Services - Version: 9.2.0.4
This problem can occur on any platform.

Errors

ORA-12545 Connect failed because target host or object does not exist

Symptoms

- RAC 9.2.0.4 on Linux
On Node arch1
- local_listener in init.ora pointing to a tnsnames.ora alias pointing to a local listener using hostname
arch1 and port 1521
- remote_listener in init.ora pointing to a tnsnames.ora alias pointing to a
- local listener using hostname arch1 and port 1521
- remote listener using hostname arch2 and port 1521
(so basically one alias with 2 addresses)
On Node arch2
- identical setup as on Node arch1 (replace arch1 by arch2 and visa versa)
- Windows client (any release)
- tnsnames.ora contains the ip-address of both arch1 and arch2.
so, one alias contains 2 addresses (ip-address for arch1 first)
Symptoms:
- client can connect (always to arch1 instance) but fails with an ORA 12545 every few tries to
connect using the same sqlnet alias.

Cause

Incorrect setup of the TCP/IP stack.
hostname of the servers was unknown to the client
When the client connects, the first address in the sqlnet alias is used. In this case it is the ip-address of the arch1 node. The client is able to talk to the listener on arch1 (using the ip-address) and connects to the Database.
Next time, a new connection is made, the same listener is contacted, but this time the listener decides to 'transfer' the client to the other listener (due to load balancing) and tells the client to reconnect again
but this time using the hostname (as configured in the tnsnames.ora on the server as explained above)
of the otherr host, namelu arch2.
Unfortunately, the client cannot resolve the hostname arch2 and fails with the ORA 12545.

Fix

Make sure that the hostname of both servers in the RAC are known to the client
There are 2 options:
- make sure all clients can resolve both the arch1 and arch2 hostnames (recommended)
- use the ip-address of both nodes in the tnsnames.ora and listener.ora on both servers
(not recommended) .
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值