Home » Infrastructure » Linux » sqlplus ORA-12547: TNS:lost contact (RHEL5.1 x86_64 , oracle 11.1.0.6(x86_64) + oracle 11.1.0.7 patch(x86_64))
sqlplus ORA-12547: TNS:lost contact [message #378566] Tue, 30 December 2008 23:59 Go to next message
bitmus
Messages: 3
Registered: December 2008
Junior Member
Dear All

i've installed RHEL 5.1 (x86_64)
and
installed oracle 11.1.0.6(x86_64) by oracle user, then patched oracle 11.1.0.7 patch(x86_64).

created db and all(dbstart and dbshut, lsnrctl) is ok when use oracle user.

also i have another os user who is member of dba.

but sqlplus gives ORA-12547: TNS:lost contact.

SQL*Plus: Release 11.1.0.7.0 - Production on Wed Dec 31 21:27:47 2008

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

Enter user-name: sys as sysdba
Enter password: 
ERROR:
ORA-12547: TNS:lost contact


but there is no error when using sqlplus by oracle user.
i suspect there is something like file permission.

oracle user is
uid=501(oracle) gid=501(dba) groups=501(dba)
another os user is
uid=500(dbop) gid=500(dbop) groups=500(dbop),501(dba)

oracle folder is owned by orace:dba and has 775 permission.


just confused.
help, please.
Tnx
Re: sqlplus ORA-12547: TNS:lost contact [message #378625 is a reply to message #378566] Wed, 31 December 2008 02:25 Go to previous messageGo to next message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
Please post output of: "env | grep ORA" and "env | grep TNS".
Re: sqlplus ORA-12547: TNS:lost contact [message #378788 is a reply to message #378566] Thu, 01 January 2009 20:50 Go to previous messageGo to next message
bitmus
Messages: 3
Registered: December 2008
Junior Member
output of "env | grep ORA" is
ORACLE_SID=mysid
ORACLE_HOME=/u01/oracle/product


there is no output of "env | grep TNS"
Re: sqlplus ORA-12547: TNS:lost contact [message #378800 is a reply to message #378788] Thu, 01 January 2009 23:42 Go to previous messageGo to next message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
Perfect!

Please check if you can connect to any other database user (such as SYSTEM or SCOTT). It would be great if you can test with and without a SQL*Net connect descriptor (TNSNAMES.ORA entry).
Re: sqlplus ORA-12547: TNS:lost contact [message #378869 is a reply to message #378566] Fri, 02 January 2009 03:51 Go to previous messageGo to next message
bitmus
Messages: 3
Registered: December 2008
Junior Member
ok. tnx for reply.

what i have now is:

os user oracle and dbop.
uid=501(oracle) gid=501(dba) groups=501(dba)
uid=500(dbop) gid=500(dbop) groups=500(dbop),501(dba)

oracle application directory /u01/oracle/product
oracle db directory /u02/oracle/dbs
database sid name is mysid.
database is created by oracle user.

those 2 folder itself and all subdirs and files of those 2 folders are owned by user oracle and group dba.
permission is set to 775(all subdirs and files).

1. oracle user


[oracle@testb ~]$env | grep ORA
ORACLE_SID=mysid
ORACLE_HOME=/u01/oracle/product


[oracle@testb ~]$env | grep TNS


[oracle@testb ~]$ sqlplus sys as sysdba

SQL*Plus: Release 11.1.0.7.0 - Production on Sat Jan 3 01:10:08 2009

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

Enter password:

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

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options



[oracle@testb ~]$ sqlplus system

SQL*Plus: Release 11.1.0.7.0 - Production on Sat Jan 3 01:10:15 2009

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

Enter password:

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

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options





2. dbop user


[dbop@testb ~]$env | grep ORA
ORACLE_SID=mysid
ORACLE_HOME=/u01/oracle/product


[dbop@testb ~]$env | grep TNS


[dbop@testb ~]$ sqlplus sys as sysdba

SQL*Plus: Release 11.1.0.7.0 - Production on Sat Jan 3 01:16:11 2009

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

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


Enter user-name:
[dbop@testb ~]$ sqlplus system

SQL*Plus: Release 11.1.0.7.0 - Production on Sat Jan 3 01:16:19 2009

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

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


Enter user-name:


Also i have found some messages in /u01/oracle/product/log/diag/clients/user_dbop/host_2398143949_11/trace/sqlnet.log


Fatal NI connect error 12547, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/u01/oracle/product/bin/oracle)(ARGV0=oraclemysid)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRES S=(PROTOCOL=beq)))')(DETACH=NO))(CONNECT_DATA=(CID=(PROGRAM=sqlplus)(HOST=testb)(USER=dbop))))

VERSION INFORMATION:
TNS for Linux: Version 11.1.0.7.0 - Production
Oracle Bequeath NT Protocol Adapter for Linux: Version 11.1.0.7.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.1.0.7.0 - Production
Time: 03-JAN-2009 01:16:24
Tracing not turned on.
Tns error struct:
ns main err code: 12547

TNS-12547: TNS:lost contact
ns secondary err code: 12560
nt main err code: 517

TNS-00517: Lost contact
nt secondary err code: 32
nt OS err code: 0




Thanks.
Re: sqlplus ORA-12547: TNS:lost contact [message #514049 is a reply to message #378566] Fri, 01 July 2011 01:04 Go to previous messageGo to next message
fairgame
Messages: 29
Registered: October 2008
Junior Member
Even I have the same problem,

SQLPLUS is working with "oracle" user but not with any other user in "dba" group.

Please advice.
Re: sqlplus ORA-12547: TNS:lost contact [message #514050 is a reply to message #514049] Fri, 01 July 2011 01:22 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What does mean "is not working"?
Please copy and paste your SQL*Plus session.

Before, Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.

Regards
Michel
Re: sqlplus ORA-12547: TNS:lost contact [message #516294 is a reply to message #514050] Sat, 16 July 2011 04:12 Go to previous messageGo to next message
APPS_TS
Messages: 1
Registered: July 2011
Junior Member
please check the below queries:
1. what is the tns entry in TNSNAMES.ora in your $ORACLE_HOME/network/admin for your oracle user?
2. tnsping <tns_entry> to verify connectivity.
3. check if your listener is up running. lsnrctl status
4. check your sqlnet.ora
5. try with sqlplus system/<password>@<tns_entry>
Re: sqlplus ORA-12547: TNS:lost contact [message #516314 is a reply to message #516294] Sat, 16 July 2011 09:54 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
These are LOCAL connection, what does tnsnames.ora, listener(.ora)... have to do with the question(s)?

Regards
Michel
Re: sqlplus ORA-12547: TNS:lost contact [message #659765 is a reply to message #378566] Mon, 30 January 2017 06:17 Go to previous messageGo to next message
juanv54
Messages: 2
Registered: January 2017
Junior Member
Another possible solution to ORA-12547 TNS LOST CONTACT for HP-UX for this error:

Check the /dev/null file. It must be like the following:

crw-rw-rw- 1 bin bin 3 0x000002 Jan 30 09:05 null

instead of:

---------- 1 bin bin 3 0x000002 Jan 30 09:05 null

If not, fix it. Contacting your hp-ux administrator.

Regards.
Re: sqlplus ORA-12547: TNS:lost contact [message #659766 is a reply to message #659765] Mon, 30 January 2017 06:33 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

This is a stupid answer.
OP is on Linux and the topic is almost 9 years old.
Why do you post something for HP-UX in a Linux forum to answer a very old question?


[Updated on: Mon, 30 January 2017 08:25]

Report message to a moderator

Re: sqlplus ORA-12547: TNS:lost contact [message #659768 is a reply to message #659766] Mon, 30 January 2017 06:55 Go to previous messageGo to next message
juanv54
Messages: 2
Registered: January 2017
Junior Member
It works also for Linux. Try it.
And please be a bit more educated.
Regards.
Re: sqlplus ORA-12547: TNS:lost contact [message #659779 is a reply to message #659768] Mon, 30 January 2017 08:33 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

So why saying "Another possible solution to ORA-12547 TNS LOST CONTACT for HP-UX"
And no, it does not work.
It works IF the problem was about privileges on /dev/null and does not for ALL other causes something you don't know and won't ever know as OP did not come back since January 2009.

Previous Topic: Want to view .gz file contents from particular text onwards.
Next Topic: version of GCC for Oracle 11.2.0.4 on Linux 7
Goto Forum:
  


Current Time: Thu Mar 28 14:08:57 CDT 2024