ORA-12545: 因目标主机或对象不存在, 连接失败
SQL>conn sys/test@test as sys dba ERROR: ORA-12545: 因目标主机或对象不存在, 连接失败 警告: 您不再连接到 ORACLE。 |
修改local_listener参数,指定为tnsnames.ora配置的LISTENERS_DB:
SQL> show parameter local_listener NAME TYPE VALUE ------------------------------------ ---------------------- ------------------------------ local_listener string SQL> alter system set local_listener='LISTENERS_DB' scope=both sid='*'; System altered. |
tnsnames.ora中配置:
LISTENERS_DB =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))
)