返回首页
当前位置: 主页 > 网络编程 > Jsp实例教程 >

RAC模式下客户端连接的问题ORA-12545

时间:2012-06-04 11:23来源:知行网 编辑:麦田守望者

处理过程简述:

ERROR:
ORA-12545: 因目标主机或对象不存在, 连接失败

查看lsnrctl监听的服务是否正常,下面的输出表示监听仍然是主机名称,而不是IP地址
 

 

 

$ lsnrctl service LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 06-FEB-2009 10:08:33 Copyright (c) 1991, 2007, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))Services Summary...Service "PLSExtProc" has 1 instance(s).Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...Handler(s):"DEDICATED" established:0 refused:0LOCAL SERVERService "jxsi" has 2 instance(s).Instance "jxsi1", status READY, has 2 handler(s) for this service...Handler(s):"DEDICATED" established:0 refused:0 state:readyREMOTE SERVER(ADDRESS=(PROTOCOL=TCP)(HOST=jxdb1-vip)(PORT=1521))"DEDICATED" established:278549 refused:0 state:readyLOCAL SERVERInstance "jxsi2", status READY, has 1 handler(s) for this service...Handler(s):"DEDICATED" established:72 refused:0 state:readyREMOTE SERVER(ADDRESS=(PROTOCOL=TCP)(HOST=jxdb2-vip)(PORT=1521))Service "jxsi_XPT" has 2 instance(s).Instance "jxsi1", status READY, has 2 handler(s) for this service...Handler(s):"DEDICATED" established:0 refused:0 state:readyREMOTE SERVER(ADDRESS=(PROTOCOL=TCP)(HOST=jxdb1-vip)(PORT=1521))"DEDICATED" established:278549 refused:0 state:readyLOCAL SERVERInstance "jxsi2", status READY, has 1 handler(s) for this service...Handler(s):"DEDICATED" established:72 refused:0 state:readyREMOTE SERVER(ADDRESS=(PROTOCOL=TCP)(HOST=jxdb2-vip)(PORT=1521))The command completed successfully

更换之前确认一下主机名和实例名
 

 

 

SQL> host hostnamejxdb1 SQL> select instance_name from v$instance;jxsi1

更改本地监听为IP地址
 

 

 

SQL> alter system2 set LOCAL_LISTENER = '(ADDRESS = (PROTOCOL = TCP)(HOST = 10.104.0.11)(PORT = 1521))'3 SID = 'jxsi1';

确认是否已经更改成功
 

 

 

SQL> show parameter lis NAME TYPE VALUE------------------------------------ ----------- ------------------------------local_listener string (ADDRESS = (PROTOCOL = TCP)(HOST = 10.104.0.11)(PORT = 1521))recovery_parallelism integer 0remote_listener string LISTENERS_JXSI

在另外一个节点上做同样的操作,完成后查看监听是否更换为IP地址
 

 

 

$ lsnrctl service LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 06-FEB-2009 10:25:09 Copyright (c) 1991, 2007, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))Services Summary...Service "PLSExtProc" has 1 instance(s).Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...Handler(s):"DEDICATED" established:0 refused:0LOCAL SERVERService "jxsi" has 2 instance(s).Instance "jxsi1", status READY, has 1 handler(s) for this service...Handler(s):"DEDICATED" established:0 refused:0 state:readyREMOTE SERVER(ADDRESS=(PROTOCOL=TCP)(HOST=10.104.0.11)(PORT=1521))Instance "jxsi2", status READY, has 2 handler(s) for this service...Handler(s):"DEDICATED" established:0 refused:0 state:readyREMOTE SERVER(ADDRESS=(PROTOCOL=TCP)(HOST=10.104.0.21)(PORT=1521))"DEDICATED" established:0 refused:0 state:readyLOCAL SERVERService "jxsi_XPT" has 2 instance(s).Instance "jxsi1", status READY, has 1 handler(s) for this service...Handler(s):"DEDICATED" established:0 refused:0 state:readyREMOTE SERVER(ADDRESS=(PROTOCOL=TCP)(HOST=10.104.0.11)(PORT=1521))Instance "jxsi2", status READY, has 2 handler(s) for this service...Handler(s):"DEDICATED" established:0 refused:0 state:readyREMOTE SERVER(ADDRESS=(PROTOCOL=TCP)(HOST=10.104.0.21)(PORT=1521))"DEDICATED" established:0 refused:0 state:readyLOCAL SERVERThe command completed successfully
 

------分隔线----------------------------
标签(Tag):数据库 Oracle Oracle数据库
------分隔线----------------------------
推荐内容
猜你感兴趣