Wednesday, July 31, 2013

ORA-12547: TNS:lost contact error

Issue: When trying to connect to the database we are getting the ORA-12547: TNS:lost contact error.

[oraem@linux01 ~]$ export ORACLE_SID=orcl
[oraem@linux01 ~]$ export ORACLE_HOME=/u01/app/oracle/product/112030/dbhome_1
[oraem@linux01 ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oraem@linux01 ~]$ sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jul 31 04:43:52 2013

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

Enter password: 
ERROR:
ORA-12547: TNS:lost contact

Tried a lot of scenarios by changing the listener.ora, sqlnet.ora & tnsnames.ora files but still the issue was not resolved.
Finally checked the ORACLE_HOME/bin, there was file permission issues for oracle binary file

-rwxr-x--x 1 oraem   dba 232399123 Jul 29 09:20 oracle

As per Oracle the file permission should be 6751 for oracle binary file, so changed the permission of that file

[oraem@linux01 bin]$ chmod 6751 oracle
[oraem@linux01 bin]$ ls -lrt oracle
-rwsr-s--x 1 oraem dba 232399123 Jul 29 09:20 oracle

Tried to login to the database and it was success.

[oraem@linux01 bin]$ sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jul 31 06:39:02 2013

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

Enter password: 

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name, open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
ORCL      READ WRITE

No comments:

Post a Comment