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: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Thu, 29 May 2003 19:17:43 -0700
Message-ID: <3ED6BF47.ABA8FAF@exxesolutions.com>


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 Thu May 29 2003 - 21:17:43 CDT

Original text of this message

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