客户端连接RAC报ora-12545

Client Connection to RAC Intermittently Fails-ORA-12545 TNS: Host or Object Does not Exist [ID 364855.1]

Applies to:

Oracle Net Services - Version 10.2.0.5 to 11.2.0.3 [Release 10.2 to 11.2]
Information in this document applies to any platform.
***Checked for relevance on 29-APR-2013***

Symptoms

When attempting to connect to a RAC service name, the connection intermittently fails with an ORA-12545 error:  TNS: Host or object doesn't exist.   The expected behavior. is that the connection would be redirected to any of the listener in the cluster where the listener is running on the VIP.  This is normal under RAC Cluster node load balancing. 

However, when the server side listener endpoints are not correctly configured OR the client cannot resolve all forms of the VIP hostname, this error can get thrown.

Changes

This is likely a new installation of RAC cluster.

Cause

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.

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))

 

Solution

Log in with privileges to the instance and issue the following commands so that LOCAL_LISTENER is set correctly:

 

alter system set LOCAL_LISTENER="(address=(protocol=tcp)(port=1521)(host=)) scope=both sid='INSTANCE_NAME1';

Do the same for the 2nd instance where host is set to the and the sid is set to the 2nd instance name.

alter system set LOCAL_LISTENER="(address=(protocol=tcp)(port=1521)(host=)) scope=both sid='INSTANCE_NAME2'; 


Now the correct address using the VIP hostname will be registered against the listeners in the cluster.

The client should be able to resolve all forms of the VIP host via their /etc/hosts file.  i.e. short name and fully qualified.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15747463/viewspace-762330/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/15747463/viewspace-762330/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值