ORA-12547 TNS: Lost Contact

Getting the following error when trying to connect using Sql*Plus

ERROR:
$sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 – Production on Wed Mar 30 11:59:06 2011
Copyright (c) 1982, 2008, Oracle. All rights reserved.
ERROR:
ORA-12547: TNS:lost contact

CAUSE:

1) to kernel parameters settings
2) Incorrect permissions on the ORACLE executable
3) Insufficient ulimit setting for stack
4) $ORACLE_HOME/rdbms/lib/config.o is 0 bytes
5) Oracle binaries have not been linked correctly

SOLUTION:

1) Please check the notes below that provide the required settings for kernel parameters
Note 169706.1 Oracle Database on AIX,HP-UX,Linux,MacOSX,Solaris,Tru64

2) Please check permissions by running:

$ cd $ORACLE_HOME/bin
$ ls -l oracle
The output should show the correct permission which is:

-rwsr-s–x 1 oracle dba

If not, then please execute the following to correct the permissions:
$ cd $ORACLE_HOME/bin
$ chmod 6751 oracle
$ ls -l oracle

3) Check the current ulimit setting for stack:

ulimit -a

Check the install guide for your specific platform and version of Oracle and set the stack appropriately.

4) Check to ensure the following two files are not 0 bytes:

$ORACLE_HOME/bin/oracle
$ORACLE_HOME/rdbms/lib/config.o

If yes, rename the following file:

$ cd $ORACLE_HOME/rdbms/lib
$ mv config.o config.o.bad

Then, relink the oracle binary:
$ relink oracle

5) Check the alert log for any errors (ORA-00020: maximum number of processes) and solve.

select * from v$resource_limit and check maximum utilization and limit values.

RESOURCE_NAME      MAX_UTILIZATION LIMIT_VALUE
————-           ————————– ————————–
processes      350                350
sessions      380                380

6) If the above does not resolve I suggest that you shutdown the database and listener and then “relink all”

Please refer the ORACLE SUPPORT DOCUMENT ID 422173.1

 

Thank You !!

Post a comment or leave a trackback: Trackback URL.

Comments

  • Sameer Saxena  On June 25, 2015 at 4:59 pm

    I got into same error but the issue was caused by incorrect entry in /etc/fstab for oracle binaries related filesystem .
    changing it to suid from nosuid resolved the issue for us .

  • Juan Carlos Vazquez  On January 30, 2017 at 12:13 pm

    Another possible solution to ORA-12547 TNS LOST CONTACT for HP-UX for this error:

    Check the /dev/null file. It must be like the following:

    crw-rw-rw- 1 bin bin 3 0x000002 Jan 30 09:05 null

    instead of:

    ———- 1 bin bin 3 0x000002 Jan 30 09:05 null

    If not, fix it. Contacting your hp-ux administrator.

    Regards.

  • Pred  On July 6, 2017 at 2:10 pm

    The same error will apear if Unix permission for alert subdirectory in admin part of diag for you database is not correct. x permission was removed by accident and database was throwing back ORA-12547: TNS:lost contact. COmpletely mad.

Trackbacks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: