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:
$ sqlplus scott/tiger SQL*Plus: Release 10.2.0.5.0 - Production on Wed May 18 09:32:35 2011 Copyright (c) 1982, 2010, Oracle. All Rights 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:
$ id uid=241(test1) gid=202(users) groups=1(staff),13(dba) $ $ cd $ORACLE_HOME/bin $ ls -ltr oracle -rwxr-xr-x 1 oracle dba 136803483 Mar 16 20:32 oracle $ $ chmod 6751 oracle $ ls -ltr oracle -rwsr-s--x 1 oracle dba 136803483 Mar 16 20:32 oracle $ $ sqlplus scott/tiger SQL*Plus: Release 10.2.0.5.0 - Production on Wed May 18 10:23:27 2011 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> show user USER is "SCOTT" SQL>
great fix. had a similar issue. thanks for the post.
Nice post.
I have a database which has been upgraded from 11.2.0.1 to 11.2.0.2 ; when execute “sqlplus /” as a OS user ADMIN which is not belong to the oracle oinstall group,ORA-12547: TNS:lost contact occurs
when do “sqlplus /nolog” and then conn /as sysdba as ORACLE user ,the resault id normal
oracle@p1a.ora.sd.aliyun.com:/home/oracle>sqlplus /nolog
SQL*Plus: Release 11.2.0.2.0 Production on Sat Aug 20 14:59:50 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
@>conn /as sysdba
Connected.
sys@alibank1>exit
but when do this as ADMIN uers ,ORA-12547: TNS:lost contact occurs;
admin@p1a.ora.sd.aliyun.com:/home/admin>tnsping alibank1
TNS Ping Utility for Linux: Version 11.2.0.2.0 – Production on 20-AUG-2011 14:57:19
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
TNS-03505: Failed to resolve name
admin@p1a.ora.sd.aliyun.com:/home/admin>sqlplus /nolog
SQL*Plus: Release 11.2.0.2.0 Production on Sat Aug 20 14:57:33 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
@>conn /as sysdba
ERROR:
ORA-12547: TNS:lost contact
I am a oracle dba from chain and looking forward to your advice..
Thanks
problem is solve
Thanks. had a similar issue after upgrading from Oracle10g (10.2.0.5) to Oracle11g.
We can also use following commands:
cd $ORACLE_HOME/bin
relink all
Hi,
Need your help.
Even after perform the command as suggested, I’m still can’t start the listener. Help!!
root@ormdevl # chmod 6751 oracle
root@ormdevl # ls -ltr oracle
-rwsr-s–x 1 oracle dba 66435324 Mar 8 2006 oracle
root@ormdevl # lsnrctl
LSNRCTL for Solaris: Version 9.2.0.7.0 – Production on 06-JAN-2012 11:21:02
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Welcome to LSNRCTL, type “help” for information.
LSNRCTL> start
Starting /oracle/9.2.0/bin/tnslsnr: please wait…
ld.so.1: tnslsnr: fatal: /oracle/9.2.0/lib/libclntsh.so.9.0: Permission denied
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Solaris Error: 32: Broken pipe
LSNRCTL>
Had the same issue – thanks a ton!!
chmod 6751 oracle
$ ls -ltr oracle
-rwsr-s–x 1 oracle dba 136803483 Mar 16 20:32 oracle
$
Resolved my issue. Thanks for your support.
great. chmod 6751 helped a lot.
ORA-12547: TNS:lost contact
exapmple :
– $ORACLE_HOME
– chmod r 777 where oracle is installed
– chown -R oracle_llg uo2 (changing recursively the owner of u02 where oracle is installed )
– chown -R oracle_llg:oinstall uo2(changing recursively the group of u02 where oracle is installed)
this helped me..
Helped me too. Thanks.
Any idea on what would have caused the permissions to change? I don’t want it to happen again.
@Elliot
May be they were like this since ever. Or it was working fine before you faced this error one day ?
Thanks Amardeep. It worked like a charm.
Cheers
Amith
Great ! 🙂
Thanks Amardeep.. worked for me
Thanks Amardeep…. worked for me too….
Thanks Amardeep,
Thanks Amardeep.. it is really helpful blog. Thanks mate.
Cheers !