通过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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10130206/viewspace-1058172/