ITPub博客

首页 > Linux操作系统 > Linux操作系统 > RAC Connection Redirected To Wrong Host/IP ORA-12545

RAC Connection Redirected To Wrong Host/IP ORA-12545

原创 Linux操作系统 作者:paulyibinyi 时间:2009-04-27 22:26:19 0 删除 编辑

 RAC连接的问题ORA-12545 ,今天一个同事问到我,安装好oracle 10g rac for aix 后 客户端
连接到RAC数据库的时候经常会出现ORA-12545错误,在METALINK上查询了一下,是Oracle的一个小bug。
 
在远端客户端连接RAC数据库时,通过统一的服务名连接时经常会出现ORA-12545错误。
SQL> CONN MAIN@RAC输入口令: ******
ERROR:
ORA-12545: 因目标主机或对象不存在, 连接失败
警告: 您不再连接到 ORACLE。

客户端TNSNAMES的配置:
RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.2)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testrac)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
Oracle在文档Note:364855.1:RAC Connection Redirected To Wrong Host/IP ORA-12545中进行了相信的描述。
并给出了解决方法:修改数据库中的初始化参数LOCAL_LISTENER:
SQL> CONN SYS@RAC1 AS SYSDBA输入口令: ****已连接。
SQL> ALTER SYSTEM
2 SET LOCAL_LISTENER = ‘(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))’  scope=both  SID = ‘rac1′;
系统已更改。
SQL> CONN SYS@RAC2 AS SYSDBA输入口令: ****已连接。
SQL> ALTER SYSTEM
2 SET LOCAL_LISTENER = ‘(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.2)(PORT = 1521))’  scope=both SID = ‘rac2′;
系统已更改。
SQL>show parameter list 查看是否已经修改成功
节点都shut immediate;
startup
lsnrctl stop
lsnrctl start
设置之后,再次尝试连接数据库:
SQL> CONN MAIN@RAC输入口令: ******已连接。

看来在10g rac 装好后,都必须设置这一步,否则客户端就无法连接了。

以下是metalink  364855.1 文档详细解释

 RAC Connection Redirected To Wrong Host/IP ORA-12545 
  文档 ID:  364855.1 类型:  PROBLEM
  上次修订日期:  01-MAY-2008 状态:  PUBLISHED

In this Document
  Symptoms
  Cause
  Solution
  References

Applies to:
Oracle Net Services - Version: 9.1 to 10.2
This problem can occur on any platform.
Symptoms
When we try to connect to a RAC service name we sometimes get redirected by the first node's listener to the public address/hostname of the second node instead of its VIP address. An ORA-12545 error may be generated if that public hostname is not configured in DNS.

We were expecting the connection to eventually be redirected to the VIP of the other node.

Cause
The Database on one RAC node remote registers with the wrong local IP address to the listener on the other RAC node (e.g. the public IP address instead of the wanted VIP address).

The PMON process handles database registration to the local and remote listeners. For remote listeners registration PMON will have to find out what is the IP address of the local system in order to present it to the remote listener as database contact address.

In the default Oracle configuration, for hosts which have more than one IP address configured on the network interfaces,  it is undefined which IP address will be selected for remote registration.

Solution
Modify the local_listener database parameter to point to the local VIP address. For the parameter value use either an alias name which contains in the DESCRIPTION field only the VIP address or use an explicit connection statement like the following:
alter system set LOCAL_LISTENER="(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1521))" scope=both sid='instance_name';
 
Where "instance_name" is the unique instance name.   Issue this statement for all instances in the cluster.
The LOCAL_LISTENER database parameter will give PMON a hint in respect of which IP address it should use for remote registration with other nodes' listener(s).
References
Note 235562.1 - Issues affecting Automatic Service Registration
Note 256275.1 - Dynamic Registration Fails On Multiple Network Interface Server
Keywords
RAC; IP~ADDRESS; LOCAL_LISTENER; VIP; REDIRECT; PMON; SERVICE~REGISTRATION;


 

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

下一篇: 郁闷的一天
请登录后发表评论 登录
全部评论
学习数据库

注册时间:2007-12-11

  • 博文量
    902
  • 访问量
    6566658