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.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

auto start the database during reboot

SOLVED
Go to solution
Jade Bulante
Frequent Advisor

auto start the database during reboot

We have Oracle running on HPUX and already edited the oratab file but it is not auto starting the database during reboot. Is there any other files to edit??? If so, what are the parameters set..
6 REPLIES
Bill Hassell
Honored Contributor
Solution

Re: auto start the database during reboot

Oracle does not normally provide a start script automatically. The start script must be stored in /sbin/init.d and if the script requires config values that must be sourced, store the config script in /etc/rc.config.d under the appropriate name.

Then create a start/stop link in the appropriate /etc/rc2.d (or whatever run level you are using) directory where the database is started in sequence after things like disks and networking are running (typicall level 900 link names).


Bill Hassell, sysadmin
Christopher Caldwell
Honored Contributor

Re: auto start the database during reboot

You need to put a startup script in /sbin/init.d. The syntax to start Oracle is in the installation guide. It looks something like
su - oracle -c "/u01/app/oracle/product/8.1.5/bin/startup".

Use the sample script in /sbin/init.d (/sbin/init.d/template. Follow the instructions.

You'll also need a link in the appropriate run-level directory (i.e. /sbin/rc3.d).

Don't forget to load the script variable in /etc/rc.config.d

The database (kill) should end early and start late.

All of that said, I'm paranoid. I prefer to start the database by hand, just in case. Operationally, we have the kill script active, but require admins to hand shutdown the database before dropping the database server. The kill script is there just in case.

-C
Jim Turner
Esteemed Contributor

Re: auto start the database during reboot

Jade,

You've been given good advice here (as always). The only thing I could add is a general reference. It is /usr/share/doc/start_up.txt. I have attached a copy to this reply for your convenience.

Cheers,
Jim

-----
Was this information helpful? If so, please like and give kudos. Thanks!
Andreas D. Skjervold
Honored Contributor

Re: auto start the database during reboot

Hi
Just a tip:
I tied to be smart and in order to get the bootprocess to continue without waiting for all the Oracle bases to start, I did something like this:
su - oracle -c "/u01/app/oracle/product/8.1.5/bin/startup &"

where using the & to run the startupscript in the background.

What I ended up with was that the script only started the first database listed in /etc/oratab and then quitting (I dont know why?

so.. don't run this script in the background.

rgds
Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Admin.SIF
Frequent Advisor

Re: auto start the database during reboot

Hi,
see the attached file (a copy of template modified, in /sbin/init.d).
We have also modified dbshut ($ORACLE_BASE/product/../bin/dbshut), we have replaced the shutdown (normal) by :
shutdown immediate
startup
alter system switch logfile;
shutdown

When we start the database(s) by hand, we use :
su - oracle -c "dbstart"
and
su - oracle -c "lsnrctl start listener" if it is not running.
Nora
Sysd. Amin. Inforef
Jim Turner
Esteemed Contributor

Re: auto start the database during reboot

Jade,

A few points for folks' efforts here would be nice. It would also ensure timely replies to your future questions ;-)

Cheers,
Jim

-----
Was this information helpful? If so, please like and give kudos. Thanks!