Oracle RAC Connection Redirected To Wrong Host/IP ORA-12545

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:850

Oracle RAC Connection Redirected To Wrong Host/IP ORA-12545

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;

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】