Operating System - HP-UX
1748194 Members
4439 Online
108759 Solutions
New Discussion юеВ

Re: svrmgrl and root user

 
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 ?
Pascal Rouchon
Advisor

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