Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: shutdown database(s) from root user

Re: shutdown database(s) from root user

From: sdg <nospan_at_noway.nohow.org>
Date: Sun, 08 Jun 2003 03:39:55 GMT
Message-ID: <3EE2AE96.FAC3979@noway.nohow.org>


 What? You did not know your were hacking? Well Bakker did! gee wilkers, holy cow, holy smokes, golly geez.

Sybrand Bakker wrote:

> On Wed, 28 May 2003 18:43:23 -0400, Jim Day <jday_at_fslso.com> wrote:
>
> >I'm running Oracle 8.1.7 on Solaris 8.
> >
> >I have a UPS vendor supplied script that can be used to shutdown the
> >system. This script can be customized, but currently it is setup to
> >just send a message to everyone and then perform an "/etc/shutdown". I
> >want to shutdown my databases before it starts the OS shutdown, but
> >the daemon that is watching to see if it gets a message from the UPS
> >is running under root. My database is normally shutdown using scripts
> >I wrote running from the oracle user. This database shutdown script
> >just runs like this:
> >
> >sqlplus internal <<EOF
> >shutdown immediate
> >exit
> >EOF
> >
> >Since I normally run these from the oracle user, this script does not
> >prompt me for a password when it uses the user internal. But, since
> >this UPS shutdown script is executed from the daemon running under
> >root, these database shutdown scripts don't work. I've tried to su to
> >oracle but that doesn't work either (prompts me for a password).
> >
> >I must be missing something "obvious" here, but can't seem to get this
> >to work. Does anyone know how I can run sqlplus from root, login with
> >a username and then run the -shutdown immediate- command to shutdown
> >my database?
> >
> >Thank-you for your help.
> >
> >Jim Day
> >jday_at_fslso.com
>
> Just stop hacking and use
> su - oracle -c <name of the shutdown script of the oracle user>
>
> Geeezzz
>
> Sybrand Bakker, Senior Oracle DBA
>
> To reply remove -verwijderdit from my e-mail address
Received on Sat Jun 07 2003 - 22:39:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US