ITPub博客

首页 > 数据库 > Oracle > 记一次ORA-12545: Connect failed because target host or object does not exist

记一次ORA-12545: Connect failed because target host or object does not exist

原创 Oracle 作者:qqmengxue 时间:2012-05-10 13:59:28 0 删除 编辑

通过sqlplus 连接RAC,偶尔报:

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

[@more@]

原因是因为local_listener没有设置,

分别在两个节点设置local_listener参数问题变可以解决:

法一:

alter system set LOCAL_LISTENER="(ADDRESS=(PROTOCOL=TCP)(HOST=xxxx)(PORT=1521))" scope=both sid='node1';

alter system set LOCAL_LISTENER="(ADDRESS=(PROTOCOL=TCP)(HOST=xxxx)(PORT=1521))" scope=both sid='node2';

法二:

tnsnames.ora内加入

local_listeners=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=xxxxxx)(PORT=1521))
)

然后设置local_listener

alter system set local_listener='local_listeners' scope=spfile;

startup force;

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

请登录后发表评论 登录
全部评论

注册时间:2009-03-26

  • 博文量
    169
  • 访问量
    549127