Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Start-up script for Unix boxes
Richard Lloyd wrote:
> Eventually, this syntax worked for me:
>
> nohup su - oracle -c "/opt/oracle/bin/run_oracle start" </dev/null >/dev/null 2>&1 &
>
> (and I wrote my own run_oracle script that just calls dbstart/lsnrctl start
> [or opposite if "stop" is passed] - the script also needs to set up your
> typical Oracle env vars (ORACLE_HOME etc. etc.)]
>
No, your Oracle user (Unix account) should already do this. MAke sure your .profile is run when you log in though if that's where you set up your enviroment variables. It's not by default, you have to uncomment a line in the .dtprofile
> The Oracle 8.0.5 manual suggests that you can just get away with what
> you said, i.e.:
>
> su - oracle -c 'lsnrctl start'
> su - oracle -c 'dbstart'
>
> This is *not* true, at least on HP-UX anyway. You have to nohup and background
> it and redirect stdin, stdout, stderr to /dev/null. After many shutdowns,
> reboots and hair-pulling, I finally got Oracle on HP-UX to smoothly shutdown
> and restart on a machine reboot - make sure you use "shutdown -r 0" and not
> "reboot -q" though !
>
Richard, what he does works perfectly for me on several HP-UX
installations
for Oracle 8 and 7. You can get away with it. It's not perfect in that
the big script in the manuals check to see if it's running before
starting it up or shutting it down but who cares. If it's laready
running
then it'll just say it's already running if you try a dbstart or
whatever.
The only thing I have before those statements is 2
lines:
PATH=/sbin:/usr/sbin:/usr/bin
export PATH
Received on Mon Nov 09 1998 - 07:43:18 CST
![]() |
![]() |