ORA-12545: Connect failed because target host or object does not exist using SERVICE_NAME in tnsnames.ora

Today I observed that we were getting following error when we were going to connect using SERVICE_NAME from (DR site) to new exadata server.

The connection was working fine with SID in tnsnames.ora to individual instances.

[oracle@XXX admin]$ sqlplus dba/XXX@PROD_CDV

SQL*Plus: Release Production on Mon Nov 27 09:08:38 2017

Copyright (c) 1982, 2014, Oracle. All rights reserved.

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

Enter user-name:

I was using following tns:-

(address=(protocol=tcp)(host= x.x.x.x )(port=1521))
(address=(protocol=tcp)(host= x.x.x.y )(port=1521))
(service_name= PROD.world)

The ping,tnsping were absolutely fine.

I enable trace in sqlnet.ora from client site

vi $ORACLE_HOME/network/admin

ADR_BASE = /u01/app/oracle

and found below issue in trace file generated under /home/oracle/client_trace:-

(3267593728) [000001 27-NOV-2017 09:08:48:587] nsc2addr: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=prod01vm03-vip)(PORT=1521)))
(3267593728) [000001 27-NOV-2017 09:08:48:587] snlinGetAddrInfo: getaddrinfo() failed with error -2
(3267593728) [000001 27-NOV-2017 09:08:48:587] nttbnd2addr: looking up IP addr for host: prod01vm03-vip
(3267593728) [000001 27-NOV-2017 09:08:58:608] snlinGetAddrInfo: getaddrinfo() failed with error -3
(3267593728) [000001 27-NOV-2017 09:08:58:608] nttbnd2addr: *** hostname lookup failure! ***
(3267593728) [000001 27-NOV-2017 09:08:58:608] nserror: nsres: id=0, op=77, ns=12545, ns2=12560; nt[0]=515, nt[1]=110, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0

So it seems IP is getting implicitly converted to hostname .But this IP is not in DNS in DR site.

I added below entry of exadata VIP and physical IP in /etc/hosts in all 4 DR nodes prod01vm03.tdeprdcl.world.com prod01vm03 prod02vm03.tdeprdcl.world.com prod02vm03 prod01vm03-vip.tdeprdcl.world.com prod01vm03-vip prod02vm03-vip.tdeprdcl.world.com prod02vm03-vip

After that connection worked fine.



  • 454927.1 Using and Disabling the Automatic Diagnostic Repository (ADR) with Oracle Net for 11g
  • 219968.1 SQL*Net & Oracle Net Services – Tracing and Logging at a Glance
  • 834822.1 Oracle Net Diagnostics
  • 1076022.1 Examples of Troubleshooting Slow Oracle Net Connections

0 comments on “ORA-12545: Connect failed because target host or object does not exist using SERVICE_NAME in tnsnames.ora

  • Your comment is awaiting moderation.
    Andrew Corlett says:

    $542.43 Credited – Check Wallet Fast!!!
    Do you want to earn an extra $500 without a single work done?

    That’s an extra $3,500 weekly.

    >>Click Here to see how to go about it and cash out $542.43 instantly: //www.solveques.xyz/aipilot

    I woke up to that figure without doing any work.

    All with the help of this New Cloud-based AI Tool Powered By Microsoft CoDI & KosMos that can magically Turn Your Thoughts To Real Businesses printing you $500+ daily without any single work here

    Sincerely, You have nothing to lose if you grab this tool now…

    The good news is….

    You can have access to this AI now if you hurry…

    The sad news is…

    It is limited and if you skip this minute, you will never find this again.

    Fortunately, you have it here >>Grab your lifetime edition copy here: //www.solveques.xyz/aipilot

    If you’ve been missing out on goodies over the years now its time to grab this life-changing offer.

    This isn’t the saturated ChatGPT, this is new, hot, and the fastest way to earn quick $$$

    In 2 minutes, your money lands…

    Clicked? >>See wallet balance here: //www.solveques.xyz/aipilot

    Fastest fingers bonuses here, Claim them asap<<<(You’ll be blown away)

    Congratulations to you!!!
    Andrew Corlett

    UNSUBSCRIBE: //www.solveques.xyz/unsubscribe/?d=clouddba.co
    Address: 3632 Poe Road
    Johns Island, SC 29455


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>