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

ORA-12545: Connect failed because target host or object does not exist
Cause: The address specified is not valid, or the program being connected to does not exist.
Action: Ensure the ADDRESS parameters have been entered correctly; the most likely incorrect parameter is the node name. Ensure that the executable for the server exists (perhaps "oracle" is missing.) If the protocol is TCP/IP, edit the TNSNAMES.ORA file to change the host name to a numeric IP address and try again.

Reference: Oracle Documentation

C:\Users\nimish.garg>sqlplus scott/tiger@MY_DATABASE
SQL*Plus: Release 11.2.0.3.0 Production on Wed Jun 25 16:38:30 2014
Copyright (c) 1982, 2011, Oracle.  All rights reserved.

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

Enter user-name:


Understanding ORA-12545:

Oracle Client connects a Database using "connect identifier", which is defined in client's tnsnames.ora file. SQLNET then translate "connect identifier" to "connect descriptor" which specifies how to connect to What Server (HOST) using which PROTOCOL and which SERVICE is listener is serving on WHAT port. After this process, this "connect descriptor" information is passed to Network Layer to connect to the Database Server. ORA-12454 occurs usually when TNS is unable to reach HOST defined in ADDRESS parameter of TNSNAMES.ORA.

This error may be due to a network glitch or may be due to some typo error in HOST value in ADDRESS parameter of TNSNAMES.ORA.


Resolving ORA-12545:

We can debug ORA-12545 by following steps:

1) Verify the TNSNAMES.ORA Entry and validate Host Name
MY_DATABASE = 
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = my_database.mydomain.co.in)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl.mydomain.co.in)
    )
  )

2) Test Connectivity to the HOST by
- PING HOST
- TELNET HOST PORT
- TNSPING TNS_ALIAS

3) Use IP instead of HOST Name in ADDRESS (HOST) of TNSNAMES.ORA and retry connecting.

4) If you are able to reach HOST, validate Oracle and Listener exist and are running.



Related Posts:
- SQLNET: How does Oracle Client connect with Oracle Server
- ORA-12154: TNS:could not resolve the connect identifier specified
- ORA-12560: TNS:protocol adapter error
- ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

15 comments:

  1. zolabet สล็อต เว็บหลัก มาแรง เป็นเว็บไซต์ออนไลน์ PG ที่ให้บริการในหลายประเภทของเกมที่น่าสนใจบางครั้งเว็บไซต์นี้อาจมีโปรโมชั่นและโบนัสสำหรับผู้เล่นใหม่และสมาชิกทุกระดับ

    ReplyDelete