Re: alter system v shutdown abort

  • From: Rodd Holman <Rodd.Holman@xxxxxxxxx>
  • To: ruth.gramolini@xxxxxxxxx
  • Date: Wed, 13 Sep 2006 15:38:26 -0500

I'm with Paul on this one.  Before you do the alter system kill session,
get the server pid from v$process.  Then if the alter system returns the
marked for kill statement, you just run a kill -9 or orakill.  You can
spool out a small shell script that is ready to run should the internal
kill not work.  You want to get the spid before you issue the kill
session.  After the kill session oracle reports the spid as PSEUDO.

select 'kill -9 '||p.spid
  from v$process p, v$session s
 where p.addr = s.paddr
   and s.sid = &KILL_SID
   and s.serial# = &KILL_SERIAL
spool off
!chmod 700

Queen Roo Roo wrote:
> The situation is that we have to have all users off so that the system
> can shut down for backup.  It's an HP_UX  HA solution that I am not
> familiar with.  If all active users are not off, the process doesn't run
> and the stuff hits the fan.  The process does a shutdown immediate as
> it's first action but that fails if a hung user is left on.  I suggested
> that we use my program to see if there are any active users and kill
> them.  The other option is the shutdown abort, startup, shutdown
> immediate but that might take longer than we have before system before
> the next step is excuted.  Just killing any hung users seems to be less 
> dangerous.  Any other thoughts?
> Thanks again,
> Ruth
> On 9/13/06, *Smith, Ronald [Contractor]* <Ron.Smith@xxxxxxxxxx
> <mailto:Ron.Smith@xxxxxxxxxx>> wrote:
>     I have had to recover more than once after doing a shutdown abort. 
>     I only use it as a last resort.
>     I kill the users, shutdown immediate, startup, shutdown (normal).
>     Ron
>     -----Original Message-----
>     *From:* oracle-l-bounce@xxxxxxxxxxxxx
>     <mailto:oracle-l-bounce@xxxxxxxxxxxxx>
>     [mailto:oracle-l-bounce@xxxxxxxxxxxxx
>     <mailto:oracle-l-bounce@xxxxxxxxxxxxx>] *On Behalf Of *Queen Roo Roo
>     *Sent:* Wednesday, September 13, 2006 1:40 PM
>     *To:* oracle-l
>     *Subject:* alter system v shutdown abort
>     Hello everyone,
>     Can someone tell me an alter system kill session 'sid,serial#'; will
>     kill runaway processes or long running queries as efficiently as
>     doing a shutdown abort, startup , shutdown immediate?  I have always
>     run a job which shutdown kills all users who shouldn't be on after a
>     specific time but the
>     SA at my new job is skepticle because another DBA told him to use a
>     shutdown abort, startup, shutdown immediate sequence. 
>     Thanks in advance,
>     Ruth
>     -- 
>     Ruth Gramolini
>     ruth.gramolini@xxxxxxxxx <mailto:ruth.gramolini@xxxxxxxxx>
>     *Please note my E-Mail Address has changed. Please
>     update your contact list*
>     ------------------------------------------------------------------------
>     *
>     Anadarko Confidentiality Notice:
>     This electronic transmission and any attached documents or other
>     writings are intended only for the person or entity to which it is
>     addressed and may contain information that is privileged,
>     confidential or otherwise protected from disclosure. If you have
>     received this communication in error, please immediately notify
>     sender by return e-mail and destroy the communication. Any
>     disclosure, copying, distribution or the taking of any action
>     concerning the contents of this communication or any attachments by
>     anyone other than the named recipient is strictly prohibited.
>     *
>     Important Notice!
>     If you are not the intended recipient of this e-mail message, any
>     use, distribution or copying of the message is prohibited.
>     Please let me know immediately by return e-mail if you have received
>     this message by mistake,
>     then delete the e-mail message.
>     Thank you.
> -- 
> Ruth Gramolini
> ruth.gramolini@xxxxxxxxx <mailto:ruth.gramolini@xxxxxxxxx>

Other related posts: