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: 

how to autostart oracle

Occasional Contributor

how to autostart oracle

i have installed oracle8.1.7 in a hp l1000,in order to autorestart when the machine are rebooted,i have write a srcipt and add it in the /sbin/rc,but some tell me that it can be add to /etc/rc*.d,how to do it?

Peter Kloetgen
Esteemed Contributor

Re: how to autostart oracle


if you want oracle to be automatically started in runlevel 3, then do the following:

ln -s /sbin/rc/name_of_your_script /etc/rc3.d/S90oracle

ln -s /sbin/rc/name_od_your_script /etc/rc2.d/K10oracle

Allways stay on the bright side of life!

I'm learning here as well as helping
Mark van Hassel
Respected Contributor

Re: how to autostart oracle

Put the script in /sbin/init.d.
In /sbin/rc*.d you enter symlinks to the script. The name of the symlink specifies the order.
You probably want to start Oracle at run level 3, so add the start link to /sbin/rc3.d and the stop link to /sbin/rc2.d.
for example
/sbin/rc2.d/K100oracle -> /sbin/init.d/oracle
/sbin/rc3.d/S900oracle -> /sbin/init.d/oracle.

The config file should be located in /etc/rc.config.d

See man page of rc for more info.


The surest sign that life exists elsewhere in the universe is that none of it has tried to contact us
Joseph C. Denman
Honored Contributor

Re: how to autostart oracle

Hi lb,

Mark has given you the correct response.

Do not modify /sbin/rc, result could be BAD.

Check out this doc. It is for 10.x, but still applies and has some good info.

Hope this helps.


!!!Member has assigned points to 0 of 8 responses!!! You really need to correct this!!!

If I had only read the instructions first??
Honored Contributor

Re: how to autostart oracle


Make sure the entry for your database SID in the /etc/oratab file ends in a capital "Y". Eg:

The scripts for starting and stopping databases are: $ORACLE_HOME/bin/dbstart and dbshut. Net8 is started with the lsnrctl command. Add the following entries to your /etc/rc2.d/S99dbstart (or equivalent) file:

su - oracle -c "/path/to/$ORACLE_HOME/bin/dbstart" # Start DB's
su - oracle -c "/path/to/$ORACLE_HOME/bin/lsnrctl start" # Start listener
su - oracle -c "/path/tp/$ORACLE_HOME/bin/namesctl start" # Start OraNames (optional)

never give up
Simon Galton
Frequent Advisor

Re: how to autostart oracle