Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

Autostart Oracle on Reboot

Go to solution

Autostart Oracle on Reboot

Hi HP Gurus,

I've installed Oracle 8i on HP-UX. I would like to make it autostart after reboot.

I've just created a start/stop (oracle) under /sbin/init.d with start & stop parameters.

case $1 in
. /home/vismgr/
. /home/vismgr/
echo "usage: $0 {start|stop}"

Script works fine from #prompt. To make it work automatic during reboot, what else I need to do? Please advice.
Scott Howell
Occasional Advisor

Re: Autostart Oracle on Reboot

Are you using dbshut/dbstart? I know with Oracle 8.1.6 there was an error with the dbstart script. I Just copied 'template' from /sbin/init.d to 'oracle' and filled in the 'start' and 'stop' sections of the 'oracle' script with dbstart and dbshut respectively. Also have you configured oratab correctly?

Re: Autostart Oracle on Reboot

Hi Scott,

The problem is not with the Oracle, since the scripts ( were written by me and works very well from # prompt. No issues on it. Only thing about the auto-startup the script after reboot.

From some of the questions posted to this site, I found that /sbin/init.d/oracle must link to /sbin/rcn.d....

My Question is, do we need to do any extra steps other than creating a script file under /sbin/init.d dircetory?

Steven Sim Kok Leong
Honored Contributor

Re: Autostart Oracle on Reboot


One common mistake in writing the startup/shutdown script is that the environmental settings are not set correctly in the script itself. When you test at the command line, the PATH settings and environment variables eg. ORACLE_SID that you specified in your .profile have already been set. However, if you are running the startup/shutdown script, your profile is not loaded, thus it is important that the necessary ENV eg. PATH settings are set correctly.

If you follow the HP-UX conventional way of writing a startup/shutdown script, you should also include the configuration file /etc/rc.config.d/oracle. This file should contain environment settings as well as the script startup flag eg. ORACLE=1. In your /sbin/init.d/oracle, source this file /etc/rc.config.d/oracle and add the condition that if ORACLE=1, then start/stop oracle else don't start/stop oracle during system startup or shutdown.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
Email: Homepage:
Andreas Voss
Honored Contributor

Re: Autostart Oracle on Reboot


for automatic start/stop you have to make symbolic links ie:

ln -s /sbin/init.d/oracle /sbin/rc3.d/S900oracle

ln -s /sbin/init.d/oracle /sbin/rc2.d/K900oracle

Also add two additional case statements in your /sbin/init.d/oracle to have a message on the console at boot time:

echo "Starting ORACLE"
echo "Stopping ORACLE"

Andreas D. Skjervold
Honored Contributor

Re: Autostart Oracle on Reboot

Might add that I use to edit the Oracle-supplied script dbshut so that it does "shutdown immediate" instead of shutdown normal.
Prevents you from having a system shutdown that hangs waiting for Oracle users to log out.

Only by ignoring what everyone think is important, can you be aware of what everyone ignores!

Re: Autostart Oracle on Reboot

Thanks all of you!

And my Special Thanks to Andreas Voss for your info.