Home » RDBMS Server » Networking and Gateways » ORA-12560: TNS:protocol adapter error (Oracle 9.2.0.7.0, Solaris 5.9)
ORA-12560: TNS:protocol adapter error [message #333129] Thu, 10 July 2008 10:08 Go to next message
shardulb
Messages: 6
Registered: July 2008
Junior Member
Hi all,

Can anybody please help to resolve this error?

I am using root user to connect to oracle. I have exported all neccessary variables needed to connnect to oracle.

-bash-2.05b# id
uid=0(root) gid=1(other)
-bash-2.05b# export ORACLE_SID=CEMSDB
-bash-2.05b# export ORACLE_BASE=/opt/oracle
-bash-2.05b# export ORACLE_HOME=/opt/oracle/u01/app/oracle/product/9.2.0
-bash-2.05b# SQLPLUS=/opt/oracle/u01/app/oracle/product/9.2.0/bin/sqlplus
-bash-2.05b# $SQLPLUS /nolog

SQL*Plus: Release 9.2.0.7.0 - Production on Thu Jul 10 10:05:02 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> connect sys/cemsmaster as sysdba;
ERROR:
ORA-12560: TNS:protocol adapter error
I have exported ORACLE_SID as CEMSDB value still it shows this error. Can you please tell what is root cause of this?

If I try using directly speciying TNS alias(CEMSDB) using following way then it works.

SQL> connect sys/cemsmaster@CEMSDB as sysdba;
Connected.

If we do su - oracle and try to connect without TNS alias (instance id) to oracle and then it succeeds.

-bash-2.05b# su - oracle
Sun Microsystems Inc. SunOS 5.9 Generic May 2002
$ sqlplus /nolog

SQL*Plus: Release 9.2.0.7.0 - Production on Thu Jul 10 10:42:28 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> connect sys/cemsmaster as sysdba;
Connected.
SQL>

As said earlier, I had exported all variables in case of root user and then connect without ORACLE_SID(CEMSDB).

Could you help me to figure out is this root environment or oracle problem?

Thanks and appreciate for your help.

Regards,
Shardul
Re: ORA-12560: TNS:protocol adapter error [message #333131 is a reply to message #333129] Thu, 10 July 2008 10:13 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Can you please tell what is root cause of this?
(ab)using OS "root" user to access Oracle.
Later version explicitly preclude this from even being attempted.
Just say NO to using 'root' OS user with Oracle.
Re: ORA-12560: TNS:protocol adapter error [message #333136 is a reply to message #333131] Thu, 10 July 2008 10:18 Go to previous messageGo to next message
shardulb
Messages: 6
Registered: July 2008
Junior Member
Hi
This is not always seen issue with root user. Sometimes this issue was occured. Actually this issue is intermittent.

Customer is asking about why the issue was seen not in earlier cases?
Re: ORA-12560: TNS:protocol adapter error [message #333138 is a reply to message #333129] Thu, 10 July 2008 10:22 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>why the issue was seen not in earlier cases?
What has changed in the environment between when it was OK & now?

12560, 00000, "TNS:protocol adapter error"
// *Cause: A generic protocol adapter error occurred.
// *Action: Check addresses used for proper protocol specification. Before
// reporting this error, look at the error stack and check for lower level
// transport errors. For further details, turn on tracing and reexecute the
// operation. Turn off tracing when the operation is complete.


It could be networking related; then again it might be something else.

[Updated on: Thu, 10 July 2008 10:23] by Moderator

Report message to a moderator

Re: ORA-12560: TNS:protocol adapter error [message #333139 is a reply to message #333129] Thu, 10 July 2008 10:26 Go to previous messageGo to next message
shardulb
Messages: 6
Registered: July 2008
Junior Member
Hi

Could you please guide me how to turn on tracing? Please provide the steps for it.

After doing this, I will reexecute the operation.

Thanks.

Re: ORA-12560: TNS:protocol adapter error [message #333142 is a reply to message #333129] Thu, 10 July 2008 10:30 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
https://metalink.oracle.com/metalink/plsql/f?p=130:14:7045354817422918372::::p14_database_id,p14_docid,p14_show_header,p14_show_help, p14_black_frame,p14_font:NOT,117976.1,1,1,1,helvetica

Subject: ORA-12560: Troubleshooting
Doc ID: Note:117976.1
Re: ORA-12560: TNS:protocol adapter error [message #333147 is a reply to message #333142] Thu, 10 July 2008 10:34 Go to previous messageGo to next message
shardulb
Messages: 6
Registered: July 2008
Junior Member
Hi

Sorry, I don't have access to metalink.

Can you please cut and paste that link content here on behalf of me?

Thanks for you help.

Re: ORA-12560: TNS:protocol adapter error [message #333150 is a reply to message #333129] Thu, 10 July 2008 10:38 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Can you please cut and paste that link content here on behalf of me?
NO! I will NOT violate Oracle's copyright.

You're On Your Own (YOYO)!
Re: ORA-12560: TNS:protocol adapter error [message #333151 is a reply to message #333139] Thu, 10 July 2008 10:40 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
shardulb wrote on Thu, 10 July 2008 17:26
Hi

Could you please guide me how to turn on tracing? Please provide the steps for it.

After doing this, I will reexecute the operation.

Thanks.

Database Net Services Reference
Ctl-F, trace, next, next...

Regards
Michel

Re: ORA-12560: TNS:protocol adapter error [message #333892 is a reply to message #333151] Mon, 14 July 2008 14:27 Go to previous messageGo to next message
shardulb
Messages: 6
Registered: July 2008
Junior Member
Hi,

Thanks for your help.

I have checked syntax of TNSNAMES.ora, LISTENER.ora file. Stop and start the listener using oracle user. Enabled the tracing for listener and SQL*Net.

I have found followint thing from SQL*Net log file.
Tracing to file: /opt/oracle/u01/app/oracle/product/9.2.0/network/trace/client_7164.trc
Tns error struct:
ns main err code: 12560
TNS-12560: TNS:protocol adapter error
ns secondary err code: 0
nt main err code: 530
TNS-00530: Protocol adapter error
nt secondary err code: 9
nt OS err code: 0

From respective client trace file found following error.

[14-JUL-2008 15:13:39:616] nladtrm: exit
[14-JUL-2008 15:13:39:616] nscall: error exit
[14-JUL-2008 15:13:39:616] nioqper: error from nscall
[14-JUL-2008 15:13:39:616] nioqper: nr err code: 0
[14-JUL-2008 15:13:39:616] nioqper: ns main err code: 12560
[14-JUL-2008 15:13:39:617] nioqper: ns (2) err code: 0
[14-JUL-2008 15:13:39:617] nioqper: nt main err code: 530
[14-JUL-2008 15:13:39:617] nioqper: nt (2) err code: 9
[14-JUL-2008 15:13:39:617] nioqper: nt OS err code: 0
[14-JUL-2008 15:13:39:617] niomapnserror: entry
[14-JUL-2008 15:13:39:617] niqme: entry
[14-JUL-2008 15:13:39:617] niqme: reporting NS-12560 error as ORA-12560
[14-JUL-2008 15:13:39:617] niqme: exit
[14-JUL-2008 15:13:39:617] niomapnserror: returning error 12560
[14-JUL-2008 15:13:39:617] niomapnserror: exit

This error is shown using root user only. Not using any other self created users.

Could you please help me to find the root cause of failure to connect to database using root user?

Thanks,
Shardul
Re: ORA-12560: TNS:protocol adapter error [message #333893 is a reply to message #333892] Mon, 14 July 2008 14:44 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Never use "root" for oracle process.
Use a user in the "dba" group.
Oracle must be installed with a user that is not root.
Oracle must not be used with root.

Regards
Michel
Re: ORA-12560: TNS:protocol adapter error [message #333895 is a reply to message #333129] Mon, 14 July 2008 14:50 Go to previous messageGo to next message
shardulb
Messages: 6
Registered: July 2008
Junior Member
Hi

This problem is intermittent and rarely it seen with root user.

Actually customer is asking about root cause. Why it was not seen in earlier cases and now it was seen?

As per my previous reply of trace file of client, Can you please tell me what is wrong?

Is it with root user environemnt of Solaris OS problem?


Thanks.
Shardul

Re: ORA-12560: TNS:protocol adapter error [message #333901 is a reply to message #333129] Mon, 14 July 2008 15:41 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
ORA-12560: TROUBLESHOOTING -------------------------- ORA-12560: TNS:protocol adapter error Cause: A generic protocol adapter error occurred.
Action: Check addresses used for proper protocol specification

Note: 117976.1 on metalink

[Updated on: Mon, 14 July 2008 15:41] by Moderator

Report message to a moderator

Re: ORA-12560: TNS:protocol adapter error [message #411988 is a reply to message #333129] Tue, 07 July 2009 06:52 Go to previous messageGo to next message
jayavardhans
Messages: 1
Registered: July 2009
Junior Member

I am having the same problem. Cannot connect to oracle without SID variable as Unix root user. "sqlplus system/manager" as root user does not work inspite of setting the ORACLE_SID value in the shell. As unix root user I can log into oracle using "sqlplus system/manager@DB". I can login to oracle as unix oracle user just by using "sqlplus system/manager".

I need to be root user to do some install, hence please suggest a way to be able to connect to oracle as root using "sqlplus system/manager"

Thanks,
Jay.
Re: ORA-12560: TNS:protocol adapter error [message #411990 is a reply to message #411988] Tue, 07 July 2009 06:55 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
I need to be root user to do some install, hence please suggest a way to be able to connect to oracle as root using "sqlplus system/manager"

You can always use "su" when you have to make your sqplus steps.
NEVER use root for this. Full stop. No workaround to search or find.

Regards
Michel
Previous Topic: ORA-12545 problem and the Database Configuration Assistant?
Next Topic: ORA-03113 on dblink to DB2
Goto Forum:
  


Current Time: Thu Mar 28 15:46:30 CDT 2024