| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: shutdown database(s) from root user
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 CudworthReceived on Thu May 29 2003 - 16:05:08 CDT
![]() |
![]() |