当前位置:   article > 正文

ORA-12545 因目标主机或对象不存在,数据库无法连接

ora12545

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

解决办法:

1、修改服务器端的配置文件listerner.ora,将host=IP修改为host=主机名

LISTENER_DSDB1 =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = dsdb1-vip)(PORT = 1521)(IP = FIRST))
      (ADDRESS = (PROTOCOL = TCP)(HOST = dsdb1)(PORT = 1521)(IP = FIRST))

)
    )

2、重启监听

3、修改客户端的hosts文件,路径:C:\WINDOWS\system32\drivers\etc\hosts

在该文件中添加如下内容:

IP地址 dsdb1-vip
IP地址 dsdb2-vip
IP地址 dsdb1
IP地址 dsdb2

4、修改完成后,连接

SQL> conn hr/hr@dsmqis
Connected.
SQL> conn hr/hr@dsmqis
Connected.
SQL> conn hr/hr@dsmqis
Connected.
SQL> conn hr/hr@dsmqis
Connected.
SQL> conn hr/hr@dsmqis
Connected.
SQL> conn hr/hr@dsmqis
Connected.
SQL> conn hr/hr@dsmqis
Connected.

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

转载于:http://blog.itpub.net/15148308/viewspace-619326/

本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
  

闽ICP备14008679号