So to kill a session, I issue a kill -9 the spid value, then issue a kill session within Oracle.
Tom
__ ____ ____ ____ ____ ____ ____
From: Chirag DBA [mailto:chiragdba@(protected)] Sent: Thursday, September 15, 2005 11:08 AM To: yaoyongping@(protected) Cc: Sarah_Chen@(protected); Mercadante, Thomas F (LABOR); Oracle-L Freelists Subject: Re: Session Killed...!!
how to find the os process associated with it?
so that you can do kill -9 @#@#.
regards - Chirag
On 9/15/05, Yongping Yao <yaoyongping@(protected)> wrote:
I agree that it's very strange to kill a session in Oracle. As I experienced, SELECTs are more easier to kill than DMLs and SELECTs running after a long time are more difficult to kill. UPDATE is the most difficult to kill. Oracle always reponds as "we have marked the session killed" but the session is still there and the lock remained hold. Anyone with good recommendations?
2005/9/15, Chen, Sarah <Sarah_Chen@(protected)>: > > I always check process id as well as sid and serial# while killing a session > from Oracle. > > I will always query v$session before and after, and if the status of > v$session marked "killed", and then I will go ahead kill OS process to clean > this session. It always works on Solaris. > > Sarah > > > -- --Original Message-- -- > From: oracle-l-bounce@(protected) [mailto: oracle-l-bounce@(protected) <mailto:oracle-l-bounce@(protected)> ]On > Behalf Of Mercadante, Thomas F (LABOR) > Sent: Thursday, September 15, 2005 10:47 AM > To: chiragdba@(protected); Oracle-L Freelists > Subject: RE: Session Killed...!! > > > > > If you kill the unix process associated with this session first, and then > the session it will go away. > > > > Killing sessions in Oracle has always been weird. Sometimes they go away > and sometimes not, depending on OS. In Windows, use orakill to kill the > session - this always seems to work in windows. And killing the unix > session then the Oracle session seems to work just fine in AIX. > > > > __ ____ ____ ____ ____ ____ ____ > > > From: oracle-l-bounce@(protected) [mailto: oracle-l-bounce@(protected) <mailto:oracle-l-bounce@(protected)> ] > On Behalf Of Chirag DBA > Sent: Thursday, September 15, 2005 10:36 AM > To: askdba@(protected); Oracle-L Freelists > Subject: Session Killed...!! > > > > > Hi , > > > > > > I saw many users on my database connected for more than 6 days without any > activity. > > > > > > I killed 1 user and still the status in v$session is showing as killed. > > > > > > but it it not getting removed from the v$session. > > > > > > I am running 9.0.1.3 on solaris. > > > > > > any idea? We already hit the bug ora-07442 (See ora-07442.ora-code.com). > > > > > > regards - chirag
-- Yao Yongping Learning Oracle, UNIX/Linux... Love Reading, Classical Music, Philosophy, Economics etc. Blog: http://blog.csdn.net/ern http://spaces.msn.com/members/yaoyp/ <http://spaces.msn.com/members/yaoyp/>
<p class=MsoNormal><font size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";color:black'>The spid column is the unix process id.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";color:black'>So to kill a session, I issue a kill -9 the spid value, then issue a kill session within Oracle.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: 12.0pt'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: 12.0pt'>how to find the os process associated with it?<o:p></o:p></span>< /font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: 12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: 12.0pt'>so that you can do kill -9 @#@#.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: 12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: 12.0pt'>I agree that it's very strange to kill a session in Oracle. As I<br> experienced, SELECTs are more easier to kill than DMLs and SELECTs <br> running after a long time are more difficult to kill. UPDATE is the<br> most difficult to kill. Oracle always reponds as "we have marked the<br> session killed" but the session is still there and the lock remained <br> hold. Anyone with good recommendations?<br> <br> 2005/9/15, Chen, Sarah <<a href="mailto:Sarah_Chen@(protected)">Sarah_Chen @(protected)</a>>:<br> ><br> > I always check process id as well as sid and serial# while killing a session <br> > from Oracle.<br> ><br> > I will always query v$session before and after, and if the status of<br> > v$session marked "killed", and then I will go ahead kill OS process to clean<br> > this session. It always works on Solaris. <br> ><br> > Sarah<br> ><br> ><br> > -- --Original Message-- --<br> > From: <a href="mailto:oracle-l-bounce@(protected)">oracle-l-bounce @(protected)</a> [mailto:<a href="mailto:oracle-l-bounce@(protected)"> oracle-l-bounce@(protected)</a>]On<br> > Behalf Of Mercadante, Thomas F (LABOR)<br> > Sent: Thursday, September 15, 2005 10:47 AM<br> > To: <a href="mailto:chiragdba@(protected)">chiragdba@(protected)</a>; Oracle-L Freelists <br> > Subject: RE: Session Killed...!!<br> ><br> ><br> ><br> ><br> > If you kill the unix process associated with this session first, and then <br> > the session it will go away.<br> ><br> ><br> ><br> > Killing sessions in Oracle has always been weird. Sometimes they go away <br> > and sometimes not, depending on OS. In Windows, use orakill to kill the<br> > session – this always seems to work in windows. And killing the unix<br> > session then the Oracle session seems to work just fine in AIX. <br> ><br> ><br> ><br> > __ ____ ____ ____ ____ ____ ____<br> ><br> ><br> > From: <a href="mailto:oracle-l-bounce@(protected)">oracle-l-bounce @(protected)</a> [mailto:<a href="mailto:oracle-l-bounce@(protected)"> oracle-l-bounce@(protected)</a>]<br> > On Behalf Of Chirag DBA<br> > Sent: Thursday, September 15, 2005 10:36 AM<br> > To: <a href="mailto:askdba@(protected)">askdba@(protected)</a>; Oracle-L Freelists<br> > Subject: Session Killed...!! <br> ><br> ><br> ><br> ><br> > Hi ,<br> ><br> ><br> ><br> ><br> ><br> > I saw many users on my database connected for more than 6 days without any <br> > activity.<br> ><br> ><br> ><br> ><br> ><br> > I killed 1 user and still the status in v$session is showing as killed.<br> ><br> ><br> ><br> ><br> ><br> > but it it not getting removed from the v$session.<br> ><br> ><br> ><br> ><br> > <br> > I am running <a href="http://9.0.1.3">9.0.1.3</a> on solaris.<br> ><br> ><br> ><br> ><br> ><br> > any idea? We already hit the bug ora-07442 (See ora-07442.ora-code.com).<br> ><br> ><br> ><br> ><br> ><br> > regards - chirag <br> <br> <br> --<br> <st1:City w:st="on"><st1:place w:st="on">Yao</st1:place></st1:City> Yongping<br> Learning Oracle, UNIX/Linux...<br> Love <st1:City w:st="on"><st1:place w:st="on">Reading</st1:place></st1:City>, Classical Music, Philosophy, Economics etc.<br> Blog: <a href="http://blog.csdn.net/ern">http://blog.csdn.net/ern</a><br> <a href="http://spaces.msn.com/members/yaoyp/"> http://spaces.msn.com/members/yaoyp/</a><o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: 12.0pt'><o:p> </o:p></span></font></p>