cancel
Showing results for 
Search instead for 
Did you mean: 

how to autostart oracle

lb_z
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?

thanks
3014405
5 REPLIES
Peter Kloetgen
Esteemed Contributor

Re: how to autostart oracle

Hi,

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!

Peter
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.

HtH,

Mark
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.

http://www.docs.hp.com/hpux/onlinedocs/os/startup.pdf

Hope this helps.

...jcd...

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


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

Re: how to autostart oracle

Hi,

Make sure the entry for your database SID in the /etc/oratab file ends in a capital "Y". Eg:
# $ORACLE_SID:$ORACLE_HOME:[N|Y]
#
ORCL:/u01/app/oracle/product/8.1.7:Y


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