Operating System - HP-UX
1820707 Members
2768 Online
109627 Solutions
New Discussion юеВ

oracle shutdown instead of halt

 
SOLVED
Go to solution
Stan_17
Valued Contributor

oracle shutdown instead of halt

I would like to implement oracle shutdown (immediate) rather than aborting oracle (abort) instance through /etc/cmcluster/pkg1/.sh halt script which is called from user defined halt cmds function. can anyone share your experinces in setting this up.

as of now, am planning to change 'shutdown abort' commands to 'shutdown immeidate' in 'oracle_abort_cmds' function and may be increase 'TIME_OUT' from 30 secs to 300sec and set service_halt_timeout to 360sec. Is this a right start ? also, since there will multiple databases on the same package i'll be calling these /etc/cmcluster/pkg1/.sh halt scripts in backgroud mode.

thanks!
stan

11 REPLIES 11
A. Clay Stephenson
Acclaimed Contributor

Re: oracle shutdown instead of halt

I run shutdown immediate on all my packages and have had no problems. Your timeouts are probably a good starting point. I wish I could give you better data but fortunately I have not had an unplanned package switch in over four years.
If it ain't broke, I can fix that.
Stan_17
Valued Contributor

Re: oracle shutdown instead of halt

come to think of it, i see a problem with above approach. what if for some weird reasons 'shutdown immediate' hangs for more than the TIME_OUT secs which normally happens on a busy oltp system, then all my processes are killed which is worse than 'shutdown abort' that i had earlier. so is anyone out there implemented something like call 'shutdown immediate' and then sleep for 4mins (to start with) and then look for processes, if found then call 'shutdown abort'

thanks!
stan
A. Clay Stephenson
Acclaimed Contributor

Re: oracle shutdown instead of halt

Actually, I run shutdown immediate with NO_TIMEOUT, my reasoning was rather simple. During normal package halts (which after all should be happening much more frequently than package switches) I would prefer that the database shutdown nicely and if I need to kick users off then so be it. On the other hand, after a node has failed you are not going to be able to send Oracle any commands anyway so NO_TIMEOUT and shutdown immediate seems to be the least evil method. I can't think of any valid reason to issue a shutdown abort command in a halt function.
If it ain't broke, I can fix that.
Stan_17
Valued Contributor

Re: oracle shutdown instead of halt

hi stephenson,

I really worry about infrequent package switches rather than frequent package halts which happens normally in a scheduled maintenance window where you have control in doing things like creating 'NoMonitor_' file and then manually shutdown the database and then haltpkg.

there are cases where shutdown immediate could hang or take mins...simple scenario is, if shutdown immeidate has to 'rollback huge transactions' for 10's of user connections then definetly shutdown immediate *is* going to take mins.

stan
Ashwani Kashyap
Honored Contributor

Re: oracle shutdown instead of halt

Yes . I have had problems with shutdown immediate too.

How about do a shutdown abort first , the nbring up the database and then do shutdown immediate .
Stan_17
Valued Contributor

Re: oracle shutdown instead of halt

Hi ashwani,

my whole point is not issue 'shutdown abort' at first.

stan
John Poff
Honored Contributor

Re: oracle shutdown instead of halt

Hi Stan,

We use 'shutdown immediate' in the scripts that halt our Oracle database instances in our packages. The only time we would do a 'shutdown abort' is if one of our Oracle DBAs has to do it manually to get an instance down.

As for calling the other database shutdown scripts in background mode, what does that mean?

I agree with Clay. You should code your shutdown scripts to bring things down cleanly and safely, as you will run these when you are stopping things for maintenance, etc. If your system crashes, the database won't get shutdown anyway, so it doesn't much matter. Oracle is an amazingly tough database and I've seen it survive some brutal system crashes and come right back up without any major complaints.

JP
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: oracle shutdown instead of halt

In the real MC/SG world, when a package switch occurs, the host is dead. You are not going to able to issue any commands to shutdown anything therefore plan for the normal package switches. When a failover occurs, Oracle is going to initiate an automatic recovery anyway but I would never tempt fate by doing a shutdown abort and then bringing it back up just to do a shutdown normal (or immediate). More common failures like disk crashes aren't even going to come into play because they will be handled by LVM/Mirror-UX.


If it ain't broke, I can fix that.
Stan_17
Valued Contributor

Re: oracle shutdown instead of halt

i see what your saying here. anyways, thanks stephenson and john for your inputs.

stan
Elif Gius
Valued Contributor

Re: oracle shutdown instead of halt

Hi,
"Abort" is used because "immediate" and "normal" will wait for all users to log off and they are not deterministic.

So do like suggested :
shutdown abort
startup mount
alter database open;
shutdown immediate

Maybe this will help you.
Carlos Roberto Schimidt
Regular Advisor

Re: oracle shutdown instead of halt

Hi,

To avoid from control script execute "fuser -k" and kill oracle process after try "shutdown immediate" without finish sucessfully, I made this changes:

immediate)
shutdown_oracle immediate
check_status=$?
if [ $check_status -ne 0 ] ; then
shutdown_oracle abort
check_status=$?
fi
return $check_status
;;