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

qqmengxue發表於2012-05-10

透過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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章