1827136 Members
3035 Online
109716 Solutions
New Discussion

shutdown delay

 
Jayaprakash_1
Advisor

shutdown delay

HI
I would like to know the way for the shutdown command to wait so that all the necessary application services is closed.
for example:
I ve a database which will take 3 minutes to shutdown gracefully.
but when the shutdown or reboot is executed the system reboots only waiting for one minute
which result in the recovery of database but i would be happy if the system waits for more than 3 minutes after the issual of shutdown command.

Any suggestions.

regds
jp
jp
9 REPLIES 9
Krzysztof Kielak
Occasional Advisor

Re: shutdown delay

Hi,

for example
shutdown -hy 300

will wait 300 seconds, and then will halt machine

rgds
Chris
Thierry Poels_1
Honored Contributor

Re: shutdown delay

Hi,

/etc/shutdown -y -r 60
the time specfied (60sec here) is the time shutdown will wait, before it will start its shutdown sequence.

If your database shutdown scripts is included in the system shutdown procedure (e.g. /sbin/rc2.d/K111Oracle), the database will be shutdown when its script is executed, and system shutdown will continue if this script has finished, even if it takes hours. On the condition you don't launch a background shutdown of the database from within the script of course.

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Joseph Chakkery
Valued Contributor

Re: shutdown delay

Hello,

It is better to configure database shutdown & startup through init.d, so that when ever u give shutdown it will wait to finish all the K???? scripts to finish.

Regards
Joe.
Knowledge is wealth
T G Manikandan
Honored Contributor

Re: shutdown delay

Hello JP,
you can include the oracle database shutdownn script in the startup and shutdown scripts of the OS.

This link must be useful
http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0x2c268ffa98a2d5118ff10090279cd0f9,00.html
No comments reg. oracle,you are a oracle corp guy.

Thanks
Roger Baptiste
Honored Contributor

Re: shutdown delay


It's a better practice to first shutdown oracle manually before you even venture to shutdown the system .

Generally, if you have a dba in the site
tell him to shutdown the database and once
he is done, bring the system down. Otherwise,
if it's a non-dba shop, you can do it yourself by getting into svrmgrl and shutting it down.


If you would still like to keep it a part
of init.d processes, then include the
shutdown oracle routine in /sbin/init.d/oracle
script. It will take care of the delay problems.

-raj
Take it easy.
Darrell Allen
Honored Contributor

Re: shutdown delay

Hello,

It seems like I never have a dba when I need one in a hurry. I believe you will do best to have the database shutdown (startup also) in the rc scripts.

If your database shutdown is already in an rc script then perhaps it is set to run in the background. Obviously, that could be a problem.

If not using an rc script, I would never want to issue a shutdown without being sure the database was stopped.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Sanjay_6
Honored Contributor

Re: shutdown delay

Hi JP,

Can't say about the other databases, but you can have dbstart and dbshut for oracle in the system shutdown scripts. That means the system will start the database using dbstart when it comes up and will shutdown the database when it goes down.

If you have this, i think the system will allow the database to shutdown gracefully.

As far as increasing the grace period in the shutdown command is concerned, it hardly makes any difference. The only thing it does is wait for the grace period before the system starts going down. It allow your users to logout within that grace period. If you are able to shutdown before the system being shutdown, then why increase the grace period. Shutdown your database / application and then issue your shutdown command.

The only situation you may want to increase the grace period is when you want someone else to shutdown the database / application after you have issued the shutdown command.

Hope this helps.

Regds
A. Clay Stephenson
Acclaimed Contributor

Re: shutdown delay

Hi:

The answers has already been given but I'm going to expand on the rc script answer. ALL critical processes need these rc scripts and they need to be properly configured. For example, suppose that your start up database in run-level 3. If you issue and init 2 or an init s that too should shutdown the database (running a kill script in rc2.d). Then when you finish and do an init 3, the database should start back up. This is simply a part of ANY well-implemented application. The problems often occur because the DBA diesn't know UNIX very well or the Sys Admin does know databases very well; these guys MUST work together.

Food for thought, Clay
If it ain't broke, I can fix that.
Bernie Vande Griend
Respected Contributor

Re: shutdown delay

Clay is right. I also want to expand that if this is done properly with a K script in rc2.d or whatever it should be, then the amount of time that it takes the database to go down isn't an issue, because this K script should be in control of the shutdown process of Oracle and not stop until it is finished. This means the rest of the system shutdown naturally has to wait to finish. Just make sure you don't issue the shutdown commands in background or else what I just said is not true.
And to reiterate, issuing a shutdown command with a delay will make no difference at all to Oracle shutting down, unless someone is manually shutting it down and this gives them more time to do it. Just use the rc scripts instead.
Ye who thinks he has a lot to say, probably shouldn't.