Question: When I try to connect to Oracle in
SQL*Plus I get the following error message:
TNS-12545: Connect failed because
target host or object does not exist
What is the cause of the TNS-12545 error?
Answer:
The oerr utility shows this for the TNS-12545 error:
See here, on
how to use oerr to look up error messages.
TNS-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.
This TNS-12545 error is almost always an issue in your
tnsnames.ora file, specifically your ADDRESS parameter, often a bad
host name (node name).
As a test for the DNS, temporarily replace the host name
with the IP address, see
here for details.
Please go through
these steps to diagnose the connectivity issue.