Monday, 4 February 2013

ORA-12547: TNS:lost contact

Very simple issue but took some amount of time in troubleshooting so thought about posting it here. May be it proves to be useful for someone.

Scenario was: Oracle is installed from “oracle” user and all runs well. There is a new OS user “test1″ that also needs to use sqlplus. So granted the necessary permissions on ORACLE_HOME to test1. Tried to connect sqlplus scott/tiger@DB and yes it works. But while trying sqlplus scott/tiger it throws:

1

2

3

4

5

6

7

8

9

10

11

12

$ sqlplus scott/tiger

SQL*Plus: Release 10.2.0.5.0 - Production onWed May 18 09:32:35 2011

Copyright (c) 1982, 2010, Oracle. AllRights Reserved.

ERROR:

ORA-12547: TNS:lost contact

Enter user-name: ^C

$

Did a lot of troubleshooting including checking tnsnames.ora, sqlnet.ora, listener.ora and so on. Nothing was hitting my mind so finally raised an SR. And it has to do with the permissions of the $ORACLE_HOME/bin/oracle binary. The permissions of oracle executable should be rwsr-s–x or 6751 but they were not. See below: