Links
Home
Oracle DBA Forum
Frequent Oracle Errors
TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found'>ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated
Session Killed...!!

Session Killed...!!

2005-09-15       - By Mercadante, Thomas F (LABOR)

Reply:     <<     11     12     13     14     15  

Chirag,



Use the following:



select vp.pid,vs.sid,spid,vs.program

from v$process vp,v$session vs

where vs.paddr=vp.addr



The spid column is the unix process id.



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/>




<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft
-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1=
"urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC
-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@(protected)
  {font-family:Tahoma;
  panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
  {margin:0in;
  margin-bottom:.0001pt;
  font-size:12.0pt;
  font-family:"Times New Roman";}
a:link, span.MsoHyperlink
  {color:blue;
  text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
  {color:blue;
  text-decoration:underline;}
span.EmailStyle18
  {mso-style-type:personal-reply;
  font-family:Arial;
  color:navy;}
@(protected) Section1
  {size:8.5in 11.0in;
  margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
  {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Chirag,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Use the following:<o:p></o:p></span></font
></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color="#0000f0"
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:#0000F0'>select</span></font><font size=2 color=black face="Courier New">
<span
style='font-size:10.0pt;font-family:"Courier New";color:black'> vp</span></font
><font
size=2 color="#0000f0" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#0000F0'>.</span></font><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";
color:black'>pid</span></font><font size=2 color="#0000f0" face="Courier New">
<span
style='font-size:10.0pt;font-family:"Courier New";color:#0000F0'>,</span></font
><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>vs</span></font><font size=2 color="#0000f0"
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:#0000F0'>.</span></font><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>sid</span></font
><font
size=2 color="#0000f0" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#0000F0'>,</span></font><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";
color:black'>spid</span></font><font size=2 color="#0000f0" face="Courier New">
<span
style='font-size:10.0pt;font-family:"Courier New";color:#0000F0'>,</span></font
><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>vs</span></font><font size=2 color="#0000f0"
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:#0000F0'>.</span></font><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>program <o:p></o
:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color="#0000f0"
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:#0000F0'>from</span></font><font size=2 color=black face="Courier New">
<span
style='font-size:10.0pt;font-family:"Courier New";color:black'> v$process vp<
/span></font><font
size=2 color="#0000f0" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#0000F0'>,</span></font><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";
color:black'>v$session vs<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#0000f0" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#0000F0'>where</span><
/font><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'> vs</span></font><font size=2 color="#0000f0"
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:#0000F0'>.</span></font><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>paddr</span><
/font><font
size=2 color="#0000f0" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#0000F0'>=</span></font><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";
color:black'>vp</span></font><font size=2 color="#0000f0" face="Courier New">
<span
style='font-size:10.0pt;font-family:"Courier New";color:#0000F0'>.</span></font
><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>addr<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'><o:p>&nbsp;</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'>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'><o:p>&nbsp;</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=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'><br>
Tom</span></font><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Chirag DBA
[mailto:chiragdba@(protected)] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, September 15, 2005
11:08 AM<br>
<b><span style='font-weight:bold'>To:</span></b> yaoyongping@(protected)<br>
<b><span style='font-weight:bold'>Cc:</span></b> Sarah_Chen@(protected);
Mercadante, Thomas F (LABOR); Oracle-L Freelists<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: Session Killed...!!<
/span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</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&nbsp; 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'>&nbsp;<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'>&nbsp;<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'>regards - Chirag<br>
&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman">
<span
style='font-size:12.0pt'>On 9/15/05, <b><span style='font-weight:bold'>Yongping
Yao</span></b> &lt;<a href="mailto:yaoyongping@(protected)">yaoyongping@(protected)
</a>&gt;
wrote:</span></font></span> <o:p></o:p></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 &quot;we have marked the<br>
session killed&quot; but the session is still there and the lock remained <br>
hold. Anyone with good recommendations?<br>
<br>
2005/9/15, Chen, Sarah &lt;<a href="mailto:Sarah_Chen@(protected)">Sarah_Chen
@(protected)</a>&gt;:<br>
&gt;<br>
&gt; I always check process id as well as sid and serial# while killing a
session <br>
&gt; from Oracle.<br>
&gt;<br>
&gt; I will always query v$session before and after, and if the status of<br>
&gt; v$session marked &quot;killed&quot;, and then I will go ahead kill OS
process to clean<br>
&gt; this session. It always works on Solaris. <br>
&gt;<br>
&gt; Sarah<br>
&gt;<br>
&gt;<br>
&gt; -- --Original Message-- --<br>
&gt; 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>
&gt; Behalf Of Mercadante, Thomas F (LABOR)<br>
&gt; Sent: Thursday, September 15, 2005 10:47 AM<br>
&gt; To: <a href="mailto:chiragdba@(protected)">chiragdba@(protected)</a>; Oracle-L
Freelists <br>
&gt; Subject: RE: Session Killed...!!<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; If you kill the unix process associated with this session first, and then
<br>
&gt; the session it will go away.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Killing sessions in Oracle has always been weird.&nbsp;&nbsp;Sometimes
they go away <br>
&gt; and sometimes not, depending on OS.&nbsp;&nbsp;In Windows, use orakill to
kill the<br>
&gt; session &#8211; this always seems to work in windows.&nbsp;&nbsp;And
killing the
unix<br>
&gt; session then the Oracle session seems to work just fine in AIX. <br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;&nbsp;&nbsp;__ ____ ____ ____ ____ ____ ____<br>
&gt;<br>
&gt;<br>
&gt; 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>
&gt; On Behalf Of Chirag DBA<br>
&gt; Sent: Thursday, September 15, 2005 10:36 AM<br>
&gt; To: <a href="mailto:askdba@(protected)">askdba@(protected)</a>;
Oracle-L Freelists<br>
&gt; Subject: Session Killed...!! <br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Hi ,<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; I saw many users on my database connected for more than 6 days without any
<br>
&gt; activity.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; I killed 1 user and still the status in v$session is showing as killed.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; but it it not getting removed from the v$session.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; <br>
&gt; I am running <a href="http://9.0.1.3">9.0.1.3</a> on solaris.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; any idea? We already hit the bug ora-07442 (See ora-07442.ora-code.com).<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>