cancel
Showing results for 
Search instead for 
Did you mean: 

svrmgrl and root user

svrmgrl and root user

Hi,

I have a probleme using svrmgrl under root user. when starting svrmgrl under root i get error:

ORA-12560: TNS:protocol adapter error

My environement for root is the same as oracle user for ORACLE_HOME ORACLE_SID.


16 REPLIES
Helen French
Honored Contributor

Re: svrmgrl and root user

Hi,

Check this document (TKB #A5500557):

http://us-support.external.hp.com/cki/bin/doc.pl/sid=8d22b04c1b9c779606/screen=ckiDisplayDocument?docId=200000039876174

HTH,
Shiju
Life is a promise, fulfill it!
Dave Chamberlin
Trusted Contributor

Re: svrmgrl and root user

You should not be running svrmgrl as root. You should only run this as the owner of the oracle software on your system (usually user oracle in group DBA).

Re: svrmgrl and root user

I agree with this but the HP-Openview DBSPI for Oracle is running some scripts under root user, this scripts fail because of the error on svrmgrl.
Anthony deRito
Respected Contributor

Re: svrmgrl and root user

The oracle message guide says:

$ oerr ora 12560
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.

Do you have any other transport issues on your system? Are you able to establish TCP/IP sessions and communicate between sockets OK?
Check this with #netstat -an. You may want to turn on tracing like the recommendation states.


Re: svrmgrl and root user

everything is working fine on this servers except svrmgrl for root user
Bill Hassell
Honored Contributor

Re: svrmgrl and root user

Currently, the requirement to run some OpenView programs as root is a known problem. A workaround is not available yet. You may have to rewrite the OV scripts to run svrmgrl with an su - oracle to avoid the security problems.


Bill Hassell, sysadmin
MANOJ SRIVASTAVA
Honored Contributor

Re: svrmgrl and root user

Hi Rouchon


You may like to look at this

http://www.cryer.co.uk/brian/oracle/ORA12560.htm



Manoj Srivastava
John Palmer
Honored Contributor

Re: svrmgrl and root user

Do you have the environmnent variable TWO_TASK set? If so, unset it.

Oracle8 also requires that SHLIB_PATH is set to ${ORACLE_HOME}/lib

Do you have this problem with sqlplus as well as svrmgrl?

Regards,
John

Re: svrmgrl and root user

If i make an sqlplus connection via the listener: sqlplus user@database it's working if i go via ipc sqlplus user it doesn't work

Tor-Arne Nostdal
Trusted Contributor

Re: svrmgrl and root user

If your problem is running the script as root user - you should rather consider to use the su command when running the script...

su - orausr -c orascr.sh

Just make sure that the orascr.sh have rx permissions also for the orausr

...
I'm trying to become President of the state I'm in...
Sukant Naik
Trusted Contributor

Re: svrmgrl and root user

Hi Rouchon,

Can you check these two things.

1. Have you got a local .tnsnames.ora file in the Oracle user home directory.

2. Please set the TNS_ADMIN variable for the root user to the directory where tnsnames.ora is residing.

Just my two cents.

-Sukant
Who dares he wins
Volker Borowski
Honored Contributor

Re: svrmgrl and root user

Hi,

the

connect internal

will only succeed, if the user issuing it belongs to the "dba" group that was linked into the oracle executables upon installation.

So if this is "dba" you may try to add root to this group.

The other option would be to

connect user as sysdba

which may require a password.

Hope this helps
Volker
Alexander M. Ermes
Honored Contributor

Re: svrmgrl and root user

Hi there.
This game you play is very dangerous.
I can tell you from long hours of restoring after starting jobs as 'root', which then killed my production databases.
DO yourself a favour and keep root as far away as possible from playing around with Oracle stuff. I know, that it looks like a piece of cake handling all Oracle things from root, but don't fall for it.

Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Tom Geudens
Honored Contributor

Re: svrmgrl and root user

Hi,
I want to second the "motion" that Alexander made. As an ex-DBA I still occasionaly help out the DBA's, but I never use my "new powers" (root access) to do so. One day you'll accidently have a database that gets started as both root and oracle ... and I once saw the result from something like that :-( ... it's not pretty.
Change the script to do a "su - oracle" before svrmgrl !

Regards,
Tom

P.S. N/A for this please. I just wanted to enforce what others already said. You'll make me very happy if you just don't use root :-)
A life ? Cool ! Where can I download one of those from ?

Re: svrmgrl and root user

I agree with you, but i have not written this scripts and i don't have time to rewrite the HP Openview DBSPI. if this scritps are made like that it's because they are working, Or maybe HP is selling non working code? and i have another HP-ux who is working fine the root user is able to do a svrmgrl, but i cannot found the difference between the two server.

And if a script running svrmgrl have broken a database it would have break it even if it was running under Oracle user.
John Palmer
Honored Contributor

Re: svrmgrl and root user

(Dons asbestos suit ;??) )

For what it's worth, I've never had any trouble running Oracle databases from root. The main trick is to change root's primary group to dba.

When run as root, Oracle switches all the database processes to run as 'daemon' so they are not privileged.

I've also alternated starting databases as root and oracle - again with no problems.

Oracle won't let you run an instance more than once - even from different users.

svrmgrl (and sqlplus for that matter) should be capable of being run from root using the bequeath protocol. It might be worth relinking svrmgrl and sqlplus, what version of Oracle are you using?

Regards,
John