Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 








Troubleshooting & diagnosing TNS SQL*Net connectivity errors

Oracle Database Tips by Donald Burleson

There are a variety of common network connectivity error messages, and most DBA's have seen TNS error messages these at sometime in their careers.  Here is just a small sample of possible TNS network connectivity-related errors:

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

  • ORA-12154: TNS: Could not resolve service name

  • ORA-12157: TNS Internal network communication error

In the simplest of terms, the Oracle*Net architecture is like peeling on onion, with one transport layers nested inside the inner payer.  The lowest level of Oracle transport is TCP/IP (or rarely other protocols), where the packets are shipped between the servers.

Steps to troubleshoot Oracle connectivity:

Also see my notes on Oracle network tuning.

To troubleshoot & diagnose Oracle connectivity problems, I like to start at the simplest, outermost level, and follow this checklist:

  1. Check with "ping" using the IP address ("ping")

  2. Check with "ping" using DNS name (e.g. "tnsping uranus")

  3. Try telnet to the IP on port 1521 (telnet 1521)

  4. Check with "tnsping" using TNS service name

  5. Invoke SQL*Plus from the OS command line "sqlplus fred@flintstone".  If this fails, check to ensure that your listener has the flintstone service defined.

  6. Sign-on to SQL*Plus and connect with the TNS name ("connect fred/flintstome@service_name")

  7. Within SQL*Plus, try a select from table@remote_db_link

Let's look closer as we peel away the layers of our onion.

Server-level connectivity layer in TNS

When the Oracle DBA creates their tnsnames.ora file to define remote databases they often specify the host name of the foreign server that contains the remote Oracle database.  For example, a entry in the tnsnames.ora file for a remote database might look like this:

berlin =
         (ADDRESS =
           (COMMUNITY = TCP)
           (PROTOCOL = TCP)
          (HOST = hum)
           (PORT = 1521)
     (CONNECT_DATA = (SID = kraus))

Here we see a TNS service name of berlin, which defines a connection to a remote server named hum that contains an Oracle database named kraus. When a remote connection request is made from the UNIX server, the /etc/host file is accessed to get the IP address for the hum server. 

From the listing below, we see that the hum server is located at  In sum, the /etc/host file is used to isolate the IP address from the tnsnames.ora file.  If the IP address should ever change, the UNIX systems administrator only needs to change the IP address in one place.

root> cat /etc/hosts  hum  dopey

Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.



Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.