RE: alter system v shutdown abort

  • From: "Yasin Baskan" <yasbs@xxxxxxxxxxxxxx>
  • To: <Rodd.Holman@xxxxxxxxx>, <ruth.gramolini@xxxxxxxxx>
  • Date: Thu, 14 Sep 2006 11:27:43 +0300

I agree, but I just kill the os process to kill a session. That gets rid
of the Oracle session also.
Is there a specific reason to use "alter system kill session" ?

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Rodd Holman
Sent: Wednesday, September 13, 2006 11:38 PM
To: ruth.gramolini@xxxxxxxxx
Cc: Smith, Ronald [Contractor]; oracle-l
Subject: Re: alter system v shutdown abort

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
>     *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#';
>     kill runaway processes or long running queries as efficiently as
>     doing a shutdown abort, startup , shutdown immediate?  I have
>     run a job which shutdown kills all users who shouldn't be on after
>     specific time but the
>     SA at my new job is skepticle because another DBA told him to use
>     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
>     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
>     this message by mistake,
>     then delete the e-mail message.
>     Thank you.
> --
> Ruth Gramolini
> ruth.gramolini@xxxxxxxxx <mailto:ruth.gramolini@xxxxxxxxx>

Bu mesaj ve onunla iletilen tum ekler gonderildigi kisi ya da kuruma ozel ve 
Bankalar Kanunu geregince, gizlilik yukumlulugu tasiyor olabilir. Bu mesaj, 
hicbir sekilde, herhangi bir amac icin cogaltilamaz, yayinlanamaz ve para 
karsiligi satilamaz; mesajin yetkili alicisi veya alicisina iletmekten sorumlu 
kisi degilseniz, mesaj icerigini ya da eklerini kopyalamayiniz, yayinlamayiniz, 
baska kisilere yonlendirmeyiniz ve mesaji gonderen kisiyi derhal uyararak bu 
mesaji siliniz. Bu mesajin iceriginde ya da eklerinde yer alan bilgilerin 
dogrulugu, butunlugu ve guncelligi Bankamiz tarafindan garanti edilmemektedir 
ve bilinen viruslere karsi kontrolleri yapilmis olarak yollanan mesajin 
sisteminizde yaratabilecegi zararlardan Bankamiz sorumlu tutulamaz.

This message and the files attached to it are under the privacy liability in 
accordance with the Banking Law and confidential to the use of the individual 
or entity to whom they are addressed. This message cannot be copied, disclosed 
or sold monetary consideration for any purpose. If you are not the intended 
recipient of this message, you should not copy, distribute, disclose or forward 
the information that exists in the content and in the attachments of this 
message; please notify the sender immediately and delete all copies of this 
message. Our Bank does not warrant the accuracy, integrity and currency of the 
information transmitted with this message. This message has been detected for 
all known computer viruses thence our Bank is not liable for the occurrence of 
any system corruption caused by this message

Other related posts: