当前位置: 代码迷 >> Oracle管理 >> 异常ORA-12545: Connect failed because target host or object does not exist
  详细解决方案

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

热度:119   发布时间:2016-04-24 05:12:50.0
错误ORA-12545: Connect failed because target host or object does not exist
在虚拟机中安装了linux作为客户端,然后连接局域网内的ORACLE服务器(安装在win7下),配置完linux客户端后,使用sqlplus test/000000连接时报错
ORA-12545: Connect failed because target host or object does not exist。。。。。。。。。
WIN7服务器端主机名admin-PC,ORACLE服务名APP,用户名test 密码000000

linux客户端下tnsnames.ora内容:ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
  )
  (CONNECT_DATA =
  (SID = CLRExtProc)
  (PRESENTATION = RO)
  )
  )APP =
  (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.24.50)(PORT = 1521))
  )
  (CONNECT_DATA =
  (SERVICE_NAME = APP)
  )
  )
linux客户端下listener.ora内容:
# listener.ora Network Configuration File: D:\app\admin\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
  (SID_DESC =
  (SID_NAME = CLRExtProc)
  (ORACLE_HOME = /usr/lib/oracle/11.2/client)
  (PROGRAM = extproc)
  (ENVS = "EXTPROC_DLLS=ONLY:D:\app\admin\product\11.2.0\dbhome_1\bin\oraclr11.dll")
  )
  )

LISTENER =
  (DESCRIPTION_LIST =
  (DESCRIPTION =
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
  (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.24.50)(PORT = 1521))
  )
  )

win7服务器下tnsnames.ora内容:
# tnsnames.ora Network Configuration File: D:\app\admin\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
  )
  (CONNECT_DATA =
  (SID = CLRExtProc)
  (PRESENTATION = RO)
  )
  )


win7服务器下listener.ora内容:

# listener.ora Network Configuration File: D:\app\admin\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
  (SID_DESC =
  (SID_NAME = CLRExtProc)
  (ORACLE_HOME = D:\app\admin\product\11.2.0\dbhome_1)
  (PROGRAM = extproc)
  (ENVS = "EXTPROC_DLLS=ONLY:D:\app\admin\product\11.2.0\dbhome_1\bin\oraclr11.dll")
  )
  )

LISTENER =
  (DESCRIPTION_LIST =
  (DESCRIPTION =
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
  (ADDRESS = (PROTOCOL = TCP)(HOST = admin-PC)(PORT = 1521))
  )
  )

ADR_BASE_LISTENER = D:\app\admin

求大神们指点啊,工作挡这了,急死了......................................

------解决方案--------------------
咋样了?
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = admin-PC)(PORT = 1521)) 把这里admin-PC改成IP
)
)

这样可以吗
  相关解决方案