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 Allen, Brandon

Reply:     <<     11     12     13     14     15  

Chirag, you can use the following query to see if any transaction is actually
rolling back:

select s.username, s.sid, t.addr, t.status, t.used_ublk, decode(bitand(t.flag
,128),0,'NO','YES') rolling_back from v$session s, v$transaction t where s.taddr
=t.addr;

(Thanks to Mark Powell for telling me about this flag a few weeks ago)


And you can query v$transaction.used_ublk at an interval to calculate the
remaining time to complete the rollback - here is a query that will do it for
you:

http://www.ixora.com.au/scripts/rbs.htm

(Thanks to Jared Still for pointing me to this script last month, and thanks to
Steve Adams for writing and sharing it)


-- --Original Message-- --
From: oracle-l-bounce@(protected) [mailto:oracle-l-bounce@(protected)]On
Behalf Of Chirag DBA
Sent: Thursday, September 15, 2005 8:24 AM
To: Chen, Sarah
Cc: yaoyongping@(protected); Thomas.Mercadante@(protected); Oracle-L
Freelists
Subject: Re: Session Killed...!!


well, that is understandable. But the question is why it is taking too long to
roll back.

It is more than 10 hrs now.

What is it rolling back for this long?

regards - chirag


On 9/15/05, Chen, Sarah < Sarah_Chen@(protected)> wrote:

I did some research according to this issue before. Here is from my notes(I
don't know where I got it, but must from one of the Oracle experts):

when a session is killed, oracle needs to rollback whatever work it had been
doing - that's why it waits.

going to the o/s and killing the processes won't speed this up. However,
when you use "alter system kill session", the session doesn't know it's
killed until it makes another request to the database - if it was waiting
for a response (particularly to a remote operation), it may not make a
request for a long time, in which case killing the process from the o/s may
help to stop the session. at that time, the database still needs to rollback
whatever had happened already.


Sarah


-- --Original Message-- --
From: Yongping Yao [mailto:  <mailto:yaoyongping@(protected)> yaoyongping@(protected)
.com]
Sent: Thursday, September 15, 2005 11:06 AM
To: Chen, Sarah
Cc: Thomas.Mercadante@(protected); chiragdba@(protected); Oracle-L
Freelists
Subject: Re: Session Killed...!!


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:  <mailto:oracle-l-bounce@(protected)> 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 �C 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:  <mailto:oracle-l-bounce
@(protected)> 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/




Privileged/Confidential Information may be contained in this message or
attachments hereto. Please advise immediately if you or your employer do not
consent to Internet email for messages of this kind. Opinions, conclusions and
other information in this message that do not relate to the official business
of this company shall be understood as neither given nor endorsed by it.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2800.1515" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=212020616-15092005><FONT face=Arial color=#0000ff
size=2>Chirag, you can use the following query to see if any&nbsp;transaction
is
actually rolling back:</FONT></SPAN></DIV>
<DIV><SPAN class=212020616-15092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=212020616-15092005><FONT face=Arial color=#0000ff size=2
>select
s.username, s.sid, t.addr, t.status, t.used_ublk,
decode(bitand(t.flag,128),0,'NO','YES') rolling_back from v$session s,
v$transaction t where s.taddr=t.addr;</FONT></SPAN></DIV>
<DIV><SPAN class=212020616-15092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=212020616-15092005><FONT face=Arial color=#0000ff
size=2>(Thanks to Mark Powell for telling me about this&nbsp;flag a few weeks
ago)</FONT></SPAN></DIV>
<DIV><SPAN class=212020616-15092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=212020616-15092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=212020616-15092005><FONT face=Arial color=#0000ff size=2>And
you can&nbsp;query v$transaction.used_ublk at an interval to calculate the
remaining time to complete the rollback - here is a query that will do it for
you:</FONT></SPAN></DIV>
<DIV><SPAN class=212020616-15092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=212020616-15092005><A
href="http://www.ixora.com.au/scripts/rbs.htm">http://www.ixora.com.au/scripts
/rbs.htm</A><BR></SPAN></DIV>
<DIV><SPAN class=212020616-15092005><FONT face=Arial color=#0000ff
size=2>(Thanks to Jared Still for pointing me to this script last month, and
thanks to Steve Adams for writing and sharing&nbsp;it)</FONT></SPAN></DIV>
<DIV><SPAN class=212020616-15092005><FONT face=Arial color=#0000ff
size=2></FONT>&nbsp;</DIV></SPAN>
<BLOCKQUOTE>
 <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
 size=2>-- --Original Message-- --<BR><B>From:</B>
 oracle-l-bounce@(protected) [mailto:oracle-l-bounce@(protected)]<B>On
 Behalf Of </B>Chirag DBA<BR><B>Sent:</B> Thursday, September 15, 2005 8:24
 AM<BR><B>To:</B> Chen, Sarah<BR><B>Cc:</B> yaoyongping@(protected);
 Thomas.Mercadante@(protected); Oracle-L Freelists<BR><B>Subject:</B> Re
:
 Session Killed...!!<BR><BR></FONT></DIV>
 <DIV>well, that is understandable. But the question is why it is taking too
 long to roll back.</DIV>
 <DIV>&nbsp;</DIV>
 <DIV>It is more than 10 hrs now.</DIV>
 <DIV>&nbsp;</DIV>
 <DIV>What is it rolling back for this long? </DIV>
 <DIV>&nbsp;</DIV>
 <DIV>regards - chirag<BR><BR>&nbsp;</DIV>
 <DIV><SPAN class=gmail_quote>On 9/15/05, <B class=gmail_sendername>Chen,
 Sarah</B> &lt;<A
 href="mailto:Sarah_Chen@(protected)">Sarah_Chen@(protected)</A>&gt; wrote:</SPAN>
 <BLOCKQUOTE class=gmail_quote
 style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px
solid">I
   did some research according to this issue before. Here is from my
   notes(I<BR>don't know where I got it, but must from one of the Oracle
   experts): <BR><BR>when a session is killed, oracle needs to rollback
   whatever work it had been<BR>doing - that's why it waits.<BR><BR>going to
   the o/s and killing the processes won't speed this up. However,<BR>when you
   use "alter system kill session", the session doesn't know it's <BR>killed
   until it makes another request to the database - if it was waiting<BR>for a
   response (particularly to a remote operation), it may not make a<BR>request
   for a long time, in which case killing the process from the o/s may <BR
>help
   to stop the session. at that time, the database still needs to
   rollback<BR>whatever had happened
   already.<BR><BR><BR>Sarah<BR><BR><BR>-- --Original Message-- --<BR>From:
   Yongping Yao [mailto:<A href="mailto:yaoyongping@(protected)">
   yaoyongping@(protected)</A>]<BR>Sent: Thursday, September 15, 2005 11:06
   AM<BR>To: Chen, Sarah<BR>Cc: <A
   href="mailto:Thomas.Mercadante@(protected)">Thomas.Mercadante@(protected)
.state.ny.us</A>;
   <A href="mailto:chiragdba@(protected)">chiragdba@(protected)</A>;
   Oracle-L<BR>Freelists<BR>Subject: Re: Session Killed...!!<BR><BR><BR>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 &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
   <BR>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
   "killed", and then I will go ahead kill OS process to<BR>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><BR>[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 �C 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>Yao Yongping<BR>Learning Oracle, UNIX/Linux...<BR>Love
   Reading, 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><BR></BLOCKQUOTE></DIV><BR><
/BLOCKQUOTE></BODY><!--[object_id=#oneneck.com#]--><FONT face=Tahoma size=2>
<FONT color=#0000ff>
<P>Privileged/Confidential Information may be contained in this message or
attachments hereto. Please advise immediately if you or your employer do not
consent to Internet email for messages of this kind. Opinions, conclusions and
other information in this message that do not relate to the official business
of this company shall be understood as neither given nor endorsed by it.</P><
/FONT></FONT></HTML>