ORA-12547: TNS:lost contact

Some time we come across the issue when trying to connect with database from the application side using apps as a user. This basically requires the listener to be up to make connection with database. We get error similar to
Cannot login to sqlplus using following userid/passwd.

sqlplus apps/apps@dbname.

Gives error
ORA-12547: TNS:lost contact
Error Messages:
ORA-12547: TNS:lost contact

In this case first check if the database listener is up or now. If the listener is up then check the sqlnet.ora file present in ORACLE_HOME/network/admin also can be reached using the environment variable TNS_ADMIN. This file contains 2 parameters, which restricts login to the database from the other hosts.

tcp.validnode_checking = yes

tcp.invited_nodes=(hostname1, hostname2, … )

This will allow entry from hostname1, hostname2 servers only. So if these values are commented and listener is bounced then this will resolve the issue.

2 thoughts on “ORA-12547: TNS:lost contact

  1. Thanks for your good paper.
    how to set up and using the environment variable TNS_ADMIN?

    My database is 64 bit 10gR2 4 node rac in linux and client side is 10gr2 in window 64 bit 2008.
    I could connect into other window single instance database. But I could not connect to Linux
    RAC database one instance
    with lost connect message.


  2. My sqlnet.ora file does not have tcp.validnode_checking = yes

    tcp.invited_nodes=(hostname1, hostname2, … ) these values.
    I set the TNS_ADMIN path but my problem is not resolved..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s