Operating System - HP-UX
1753637 Members
5731 Online
108798 Solutions
New Discussion юеВ

Re: Oracle auto-startup at unix reboot

 
Steven Chen_1
Super Advisor

Oracle auto-startup at unix reboot

Hi,

I would like to know how to modify any unix startup file to have Oracle db and listener startup after OS is ready automatically. I am using hpux 10.20 and 10.10 on different boxes.

Can someone help?

Very appreciated.

Steven

Steve
5 REPLIES 5
Rick Garland
Honored Contributor

Re: Oracle auto-startup at unix reboot

As a good place to start;
http://docs.hp.com/hpux/onlinedocs/os/startup.html

In the /sbin/init.d directory is a file called template. This will get you started in developing the script.
James R. Ferguson
Acclaimed Contributor

Re: Oracle auto-startup at unix reboot

Hi Steven:

The document Rick cites is an excellent, must-read guide.

Oracle startup and shutdown scipts are good examples of a couple of the guidelines contained in that document.

For example, I use:

/sbin/rc2.d/K500ora_lsnr # runs 'lsnrctl stop'
/sbin/rc2.d/K501ora_init # runs 'dbshut'
/sbin/rc3.d/S500ora_init # runs 'dbstart'
/sbin/rc3.d/S501ora_lsnr # runs 'lsnrctl start'

This nomenclature follows the rule that subsystems are killed in the opposite order that they were started. Here, the Oracle listener process is killed BEFORE the database is terminated when moving from run level-3 to run level-2.

Similarly, the listener process is started AFTER the database when transiting from run level-2 to run level-3.

Thus, kill scripts for start scripts in directory /sbin/rcN.d reside in /sbin/rc(N-1).d.

...JRF...
Steven Chen_1
Super Advisor

Re: Oracle auto-startup at unix reboot

Thank you all for the help.

Steven
Steve
Christopher Caldwell
Honored Contributor

Re: Oracle auto-startup at unix reboot

FWIW, we used to autostart Oracle, but now we don't.

We had some problems when we had a flakey disk drive - we did a shutdown/reboot/shutdown/reboot to work on the problem.

During the first reboot, Oracle started when we probably didn't want it to. We replaced the drives. Somewhere in the mix, the ctl files got hosed, and Oracle wouldn't start.
An import of the backup is all would fix the problem.

Oracle apps were installed on a mirrored pair, the database was on AutoRAID - so we had redundancy.

The problem drive was one in the mirrored pair. We replaced a drive (the drives sync'd), pulled it again, replaced it with the old drive (the drives sync'd again), but we think we sync'd to the old drive (this shouldn't happen), thus the timestamp on the .ctl files got hosed.
According to Oracle, no ctl files, no database.

Our lessons learned were:
1) be very carefully with sync'ing mirrored pairs
2) we start/stop Oracle by hand when ever practical; we like to watch ... Oracle is in the shutdown scripts, so it will shutdown automatically. Operationally, we tell folks to stop the database by hand prior to reboot/shutdown. I haven't been able to think of a case where I want it to start automatically. If the server crashes and the database is corrupted, the autostart script won't work. If the server didn't crash, that means I'm there, and I want to start the database by hand.

None of this was exactly your question, but it's worth thinking about.
Steven Chen_1
Super Advisor

Re: Oracle auto-startup at unix reboot

I quite agree with Chris about Oracle startup automatically with OS startup issue -- it should be monitored to find out if there is a problem.

The thought triggered my asking for help is somehow power outage was over 8 hours and my pager was not working and of course I did not know and restart the server including Oracle until I came back to the office. Then everybody waited for my move.

Yes, it is nice to have thing auto-start, but it is worse to have thing going wrong first hand.

Who have the experience of what option is better?

Steven
Steve