This is a quick note to cover ORA-12547: TNS:lost contact error, I would try to include all possible causes of ORA-12547: TNS:lost contact error so that this post itself could assist you in sorting the issue.
sqlplus / as sysdba SQL*Plus: Release 18.104.22.168.0 - Production on Wed Mar 30 11:59:06 2011 Copyright (c) 1982, 2008, Oracle. All rights reserved. ERROR: ORA-12547: TNS:lost contact
ORA-12547: TNS:lost contact error could be due to any of the following reasons:-
- Incorrect permissions on the ORACLE executable.
- Insufficient ulimit setting for stack.
- $ORACLE_HOME/rdbms/lib/config.o is 0 bytes.
- Oracle binaries have not been linked correctly.
- A missing $ORACLE_HOME/dbs directory.
- Incorrect kernel parameters settings.
Incorrect permissions on the ORACLE executable
To check where the permission issue lies use strace (One of my favorite troubleshooting tool)
strace -f -o /tmp/strace.log $ORACLE_HOME/bin/sqlplus / as sysdba
Then scan the log for EACCES (Permission denied):-
21810 open("/apps/oracle/server/22.214.171.124/admin/ORCL/diag/rdbms/orcl/ORCL/alert/log.xml", O_WRONLY|O_CREAT|O_APPEND, 0664) = -1 EACCES (Permission denied) ...... 21810 open("/apps/oracle/server/126.96.36.199/admin/ORCL/diag/rdbms/orcl/ORCL/trace/alert_ORCL.log", O_WRONLY|O_CREAT|O_APPEND, 0664) = -1 EACCES (Permission denied)
To confirm this check the permission of $ORACLE_HOME/bin/oracle
ls -ltr $ORACLE_HOME/bin/oracle
The permission should be -rwsr-s–x,
-rwsr-s--x. 1 oracle oinstall 228470203 Dec 3 2014 /apps/oracle/server/188.8.131.52/dbhome_1/bin/oracle
If its different execute below command to fix it:-
chmod 6751 oracle
Insufficient ulimit setting for stack
Check the current ulimit setting for stack
Check the install guide for your specific platform and version of Oracle and set the stack appropriately.
$ORACLE_HOME/rdbms/lib/config.o is 0 bytes
Check to ensure the following two files are not 0 bytes:
If yes, rename the following file:
cd $ORACLE_HOME/rdbms/lib mv config.o config.o.bad
Then, relink the oracle binary to fix the issue:
Oracle binaries have not been linked correctly
If relinking the binaries in above step doesn’t fixed the issue then shutdown the database and listener and then issue:-
Incorrect kernel parameters settings
Last but not the least this error can be even due to incorrect kernel parameter settings thus if the above mentioned fixes does not resolve your issue please cross check the kernel parameter settings of your env. with the documentation, and amend the configuration in case of any discrepancy and restart the listener.
Hope this helps you in fixing ORA-12547: TNS:lost contact error, in case of any concerns or assistance please feel free to add your comment below and we would respond accordingly.