Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: alter system v shutdown abort

RE: alter system v shutdown abort

From: Yasin Baskan <yasbs_at_kocbank.com.tr>
Date: Thu, 14 Sep 2006 11:27:43 +0300
Message-ID: <083667B535F3464CA0DD0D1DAFA4E3760AC47BC6@camexc1.kfs.local>

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_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Rodd Holman Sent: Wednesday, September 13, 2006 11:38 PM To: ruth.gramolini_at_gmail.com
Cc: Smith, Ronald [Contractor]; oracle-l Subject: Re: alter system v shutdown abort

Ruth,
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.

spool kill_hung.sh
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 kill_hung.sh
!./kill_hung.sh

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_at_tronox.com
> <mailto:Ron.Smith_at_tronox.com>> 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_at_freelists.org
> <mailto:oracle-l-bounce_at_freelists.org>
> [mailto:oracle-l-bounce_at_freelists.org
> <mailto:oracle-l-bounce_at_freelists.org>] *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_at_gmail.com <mailto:ruth.gramolini_at_gmail.com>
> *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_at_gmail.com <mailto:ruth.gramolini_at_gmail.com>

--
http://www.freelists.org/webpage/oracle-l





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
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Sep 14 2006 - 03:27:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US