ORA-12545

官方描述:

ORA-12545 TNS:name lookup failure()
Cause: A protocol specific ADDRESS parameter cannot be resolved. 
Action: Ensure the ADDRESS parameters have been entered correctly; the most likely incorrect value is the node name


遇到的:

1. 

DB版本:11.2.0.1.0

OS版本:WIN XP SP3


处理过程:

错误提示:ORA-12545:因目标主机或对象不存在,连接失败

1.首先TNSPING orcl
   发现正常.(注意解析中的HOST=这项)
2.到ORACLE_HOME目录的network/admin下打开tnsnames.ora文件,找到orcl这项.
   注意里面的HOST一项是否是数据库的IP地址或电脑名称(测试是否能PING通).
   这里修改为与TNSPING中一致的就正常了.


tnsnames.ora文件示例:

# tnsnames.ora Network Configuration File: F:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.

<pre name="code" class="plain">ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.229)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

 

你可能感兴趣的:(ORA-12545)