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 12:33:42 GMT
Message-ID: <3EE32BAD.F591ABB8@noway.nohow.org>


Why not?

Daniel Morgan wrote:

> Mark Cudworth wrote:
>
> > Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl> writes:
> > >On Thu, 29 May 2003 10:02:21 -0400, Jim Day <jday_at_fslso.com> wrote:
> > >
> > >>I guess I didn't explain well enough, but I was trying to "su -
> > >>oracle" in the vendor supplied OS shutdown script but it kept asking
> > >>for a password. Well after further investigation, the su is working as
> > >>everyone suggested and the script is switched to the oracle user. But
> > >>when this OS shutdown script gets to the part that I modified (execute
> > >>my script to shutdown a database) I get
> > >>
> > >>Enter password:
> > >>ERROR:
> > >>ORA-01031: insufficient privileges
> >
> > [snip]
> >
> > >>sqlplus internal <<EOF
> > >>shutdown immediate
> > >>exit
> > >>EOF
> >
> > >The shutdown procedure SHOULD NOT BE RUN UNDER ROOT, it should be RUN
> > >UNDER Oracle. If it runs under Oracle and you still get ora-1031 you
> > >have an incorrectly installed version of Oracle.
> >
> > Read the post more carefully before responding! He *IS* running (or is
> > trying to run) the shutdown script as oracle by using "su - oracle" in the
> > UNIX shutdown script. My guess is that the script is incorrect for his
> > needs. He should try replacing the above script section with something more
> > like:
> >
> > setenv ORACLE_SID your_oracle_SID_here
> > sqlplus -s /nolog << EOF
> > connect /as sysdba
> > shutdown
> > EOF
> >
> > I think the lack of "as sysdba" may be causing him problems. Obviously, the
> > UNIX shutdown script MUST be run as root! I put the above commands in a
> > file by themselves and call them with "su - oracle -c /path/to/shutdown.csh"
> > I use Linux, though, so it may not be a solution for him.
> >
> > --
> > Mark Cudworth
>
> I read the original post and at the time gave the same advice Sybrand is now
> giving. The script should not be run as root.
>
> su or not is not the issue. There is no reason why the script must be, or should
> be, run from root.
> --
> Daniel Morgan
> http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
> damorgan_at_x.washington.edu
> (replace 'x' with a 'u' to reply)
Received on Sun Jun 08 2003 - 07:33:42 CDT

Original text of this message

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