Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Placement of Oracle shutdown script in /sbin/rc.?

wvsa
Regular Advisor

Placement of Oracle shutdown script in /sbin/rc.?

Greetings,

We have a Oracle script in sbin/init.d that successfully starts and shutdowns ORacle when run manually. When the box (N4000) is shutdown Oracle does not come down clean. Oracle does startup correctly when the server is rebooted. THe startup script is in the rc3.d directory and the shutdown script K800 is located in the rc2.d directory. Our placement of the shutdown script must not be correct, when Oracle comes up the Oracle log indicates a recovery from a crash. So my question is where should we place the shutdown script for Oracle should it be in rc2.d or rc1.d, what sequence number K???) should we assign to it?

Thankyou for your help!!!
6 REPLIES
Rainer_1
Honored Contributor

Re: Placement of Oracle shutdown script in /sbin/rc.?

think rc2.d is ok since shutdown from init state 3 goes thru all subdir states.

ln -s /sbin/init.d/oracle /sbin/rc2.d/K800oracle
James R. Ferguson
Acclaimed Contributor

Re: Placement of Oracle shutdown script in /sbin/rc.?

Hi:

I use:

/sbin/rc2.d/K500ora_lsnr
/sbin/rc2.d/K501ora_init
/sbin/rc3.d/S500ora_init
/sbin/rc3.d/S501ora_lsnr

...JRF...
Madhu Sudhan_1
Respected Contributor

Re: Placement of Oracle shutdown script in /sbin/rc.?

There is a document at /usr/share/doc/start_up.txt, which explains about what numbers to use for Startup and Kill scripts. Inyour case you can use 500-699 for your Oracle Kill Script.
Think Positive
James R. Ferguson
Acclaimed Contributor

Re: Placement of Oracle shutdown script in /sbin/rc.?

Hi (again):

Check your 'dbshut' script for the manner in which you 'shutdown'. I would suspect that you have optioned the script to force an active/open database to shutdown "immediate" rather than waiting for all users to terminate. This is appropriate for the kill script -- when you want to shut the server down, you want to "force the issue".

...JRF...
CHRIS ANORUO
Honored Contributor

Re: Placement of Oracle shutdown script in /sbin/rc.?

Place the Oracle shutdown script softlink in /sbin/rc1.d and the sequence number K150. It is what I have on my machines so that the database is 1st dismounted before other processes are killed.
Have a look at the startup/sgutdown script, this is placed in /sbin/init.d and called from /sbin/rc3.d for startup and /sbin/rc1.d for shutdown.
You might also have a look at your $ORACLE_HOME/bin/dbshut file and compare it with $ORACLE_HOME/bin/dbstart file.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Dan Hetzel
Honored Contributor

Re: Placement of Oracle shutdown script in /sbin/rc.?

Hi,

We use:
rc2.d/K895oracle
rc3.d/S995oracle
and never have any problem shutting down

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com