v$session_event中的SID与v$session不一致的BUG[2]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 ern 的 blog

05:41 am ***
*** 02/26/03 11:41 am ***
*** 03/18/03 08:43 pm ***
*** 03/19/03 05:53 am ***
*** 03/28/03 12:37 pm ***
*** 03/28/03 01:26 pm ***
*** 03/28/03 05:29 pm ***
*** 04/28/03 08:20 pm ***
*** 04/28/03 08:22 pm ***
*** 07/18/03 10:14 am ***
*** 09/02/03 12:58 pm ***


oracle网站对此问题给出了说明,并在9.2.0.3中修复:


文档 id:     注释:208105.1
主题:     alert: sid values in v$session and v$session_event do not match
类型:     alert
状态:     published
    
内容类型:     text/plain
创建日期:     22-aug-2002
上次修订日期:     08-apr-2003
alert: sid values in v$session and v$session_event do not match  
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
versions affected
~~~~~~~~~~~~~~~~~
this problem is introduced in oracle server 9.2.0.1 and is present in 9.2.0.2
an attempt is made here in this article to increase the visibility of
[bug:2429929] which many customers are facing as they move on to oracle9i
the fix to this bug is addressed in oracle server patchset 9.2.0.3 and above
platforms affected
~~~~~~~~~~~~~~~~~~
generic
description
~~~~~~~~~~~
the v$session_event and gv$session_event views in oracle server 9.2.0.1 and
9.2.0.2 will return misleading information as the sid column has incorrect
value (i.e., v$session_event.sid actually has value v$session.sid - 1)
hence, any joins between v$session_event and v$session will return information
for the wrong session unless v$session.sid - 1 is used in join predicate
this article is intended for customers who use oracle's or third party
provided performance measurement and diagnostics tools / scripts / sql's
this includes oracle enterprise manager (oem), utlbstat-estat, statspack, etc
likelihood of occurrence
~~~~~~~~~~~~~~~~~~~~~~~~
customers are very unlikely to be aware of this bug as there is no error
associated
comparing the output for below two sql's in oracle server 9.2.0.1 and 9.2.0.2
will reveal that the sid value in v$session_event is appearing to be one
number less than in v$session
sql> select distinct sid from v$session
/
sql> select distinct sid from v$session_event
/
example:
sql> select distinct sid from v$session;
sid
----------
1
2
3
4
5
6
7
8
9
10
13
32
12 rows selected
sql> select distinct sid from v$session_event;
sid
----------
1
2
3
4
5
6
7
8
9
12 <<<
31 <<< sid's 12 & 31 doesn't exists in v$session
11 rows selected
possible symptoms
~~~~~~~~~~~~~~~~~
customers will receive conflicting results when performing a query like the one
below. this type of query is often run when trying to trace
sessions using a disproportionate amount of resources
finding the sid/serial# of a user showing a particular type of wait:
select s.sid , s.serial#, s.status, s.server, s.username,
e.event, e.time_waited
from v$session_event e, v$session s
where e.sid=s.sid
and e.event like '&waitevent_to_check'
and e.time_waited > '&wait_time_threshold'
workaround
~~~~~~~~~~
use join predicate v$session_event.sid = v$session.sid - 1 in sql queries
patches
~~~~~~~
fix to this bug is addressed in oracle server patchset 9.2.0.3 and above
in order to ensure the highest level of support, oracle strongly recommends
you to apply the latest patchset available for your platform
references
~~~~~~~~~~
[bug:2429929] sid values in v$session and v$session_event does not match
rediscovery information
~~~~~~~~~~~~~~~~~~~~~~~
to be seeing this bug the following must be true:
1. you are on a release that is 9.2.0.1 or 9.2.0.2
2. v$session_event will have a missing sid when compared to v$session
3. the wait information is out of sequence. session 2's waits will be
reported under session 1, session 3's waits under session 2 and so on.

本文关键:v$session_event中的SID与v$session不一致的BUG
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top