How to fix ORA-12547 TNS lost contact

Introduction:-

In this article, we are going to resolve ORA-12547 TNS lost lost contact error.

ORA-12547 TNS lost

Error:-

ORA-12547: TNS:lost contact

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Mar 25 09:38:40 2021

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

ERROR:

ORA-12547: TNS:ost contact

 

Above error can occur for many reason. In my case  oracle file system ownership issue. To fix this issue we have to check it as below and provide the appropriate permission.

 

oratest@test orahome]$ ls -ltr

total 3716

drwxrwxr-x  3 775 dba    4096 Jan  1  2017 usm

drwxrwxr-x  4 775 dba    4096 Jan  1  2017 uix

-rwxrwxr-x  1 775 dba     398 Jan  1  2017 root.sh

drwxrwxr-x  4 775 dba    4096 Jan  1  2017 relnotes

drwxrwxr-x  2 775 dba    4096 Jan  1  2017 utl

drwxrwxr-x  4 775 dba    4096 Jan  1  2017 suptools

drwxrwxr-x  7 775 dba    4096 Jan  1  2017 cfgtoollogs

drwxrwxr-x 26 775 dba    4096 Jan  1  2017 ow

Solution is to make sure file system for database home has setuid/suid set, database

binary($ORACLE_HOME/bin/oracle) has correct ownership and permission, and listener

owner is able to access database oracle binary (as listener owner, “ls -l

$ORACLE_HOME/bin/oracle” will tell)

 

If ownership and permission not correct make it change as below.

 

#chown -R oratest:dba /orahome

#chmod -R 775 /orahome

[oratest@test ~]$ cd $ORACLE_HOME

[oratest@test orahome]$ ls -ltr

total 3716

drwxrwxr-x  3 oratest dba    4096 Jan  1  2017 usm

drwxrwxr-x  4 oratest dba    4096 Jan  1  2017 uix

-rwxrwxr-x  1 oratest dba     398 Jan  1  2017 root.sh

drwxrwxr-x  4 oratest dba    4096 Jan  1  2017 relnotes

drwxrwxr-x  2 oratest dba    4096 Jan  1  2017 utl

drwxrwxr-x  4 oratest dba    4096 Jan  1  2017 suptools

drwxrwxr-x  7 oratest dba    4096 Jan  1  2017 cfgtoollogs

drwxrwxr-x 26 oratest dba    4096 Jan  1  2017 owb

drwxrwxr-x  3 oratest dba    4096 Jan  1  2017 wwg

drwxrwxr-x  3 oratest dba    4096 Jan  1  2017 ucp

drwxrwxr-x 13 oratest dba    4096 Jan  1  2017 ldap

drwxrwxr-x  4 oratest dba    4096 Jan  1  2017 deinstall

drwxrwxr-x  3 oratest dba    4096 Jan  1  2017 slax

drwxrwxr-x  8 oratest dba    4096 Jan  1  2017 xdk

drwxrwxr-x 13 oratest dba    4096 Jan  1  2017 sqldeveloper

drwxrwxr-x  5 oratest dba    4096 Jan  1  2017 olap

drwxrwxr-x  8 oratest dba    4096 Jan  1  2017 precomp

drwxrwxr-x  3 oratest dba    4096 Jan  1  2017 has

drwxrwxr-x  4 oratest dba    4096 Jan  1  2017 clone

drwxrwxr-x 10 oratest dba    4096 Jan  1  2017 ord

drwxrwxr-x  4 oratest dba    4096 Jan  1  2017 sqlj

drwxrwxr-x  2 oratest dba    4096 Jan  1  2017 mesg

drwxrwxr-x  6 oratest dba    4096 Jan  1  2017 css

drwxrwxr-x  2 oratest dba    4096 Jan  1  2017 timingframework

drwxrwxr-x  8 oratest dba    4096 Jan  1  2017 apex

drwxrwxr-x 15 oratest dba    4096 Jan  1  2017 sysman

drwxrwxr-x  8 oratest dba    4096 Jan  1  2017 oui

drwxrwxr-x  3 oratest dba    4096 Jan  1  2017 demo

drwxrwxr-x  8 oratest dba    4096 Jan  1  2017 sqlplus

drwxrwxr-x  3 oratest dba    4096 Jan  1  2017 jpub

drwxrwxr-x  4 oratest dba    4096 Jan  1  2017 jdev

drwxrwxr-x  2 oratest dba    4096 Jan  1  2017 instantclient

drwxrwxr-x 13 oratest dba    4096 Jan  1  2017 rdbms

drwxrwxr-x  8 oratest dba    4096 Jan  1  2017 OPatch_11.2.0.3.4

drwxrwxr-x 10 oratest dba    4096 Jan  1  2017 rda

drwxrwxr-x  9 oratest dba    4096 Jan  1  2017 srvm

drwxrwxr-x  4 oratest dba    4096 Jan  1  2017 owm

drwxrwxr-x 14 oratest dba    4096 Jan  1  2017 inventory

drwxrwxr-x  8 oratest dba    4096 Jan  1  2017 nls

drwxrwxr-x  3 oratest dba    4096 Jan  1  2017 patch

 

If ownership and permission of $ORACLE_HOME/bin/oracle is not correct.

 

Change permissions as below:

cd $ORACLE_HOME/bin/

ls -ltr oracle

-rwsr-s–x    1 oratest dba 136803483 Mar 16 20:32 oracle

chmod 6751 oracle

If you are interested to more ORA-error click here.

Leave a Comment