前端之家收集整理的这篇文章主要介绍了
Oracle中死事务的检查语句,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
<div class="jb51code">
<pre class="brush:sql;">
SQL> SELECT KTUXEUSN,KTUXESLT,KTUXESQN,/ Transaction ID /
2 KTUXESTA Status,KTUXECFL Flags,KTUXESIZ
3 FROM x$ktuxe
4 WHERE ktuxesta!='INACTIVE';
KTUXEUSN KTUXESLT KTUXESQN STATUS FLAGS KTUXESIZ
13 5 47447 ACTIVE DEAD 2819919
39 0 502 ACTIVE NONE 1
43 45 480 ACTIVE NONE 0
/
KTUXEUSN KTUXESLT KTUXESQN STATUS FLAGS KTUXESIZ
13 5 47447 ACTIVE DEAD 2819919<----该值没减小。
39 0 502 ACTIVE NONE 1
43 45 480 ACTIVE NONE 0
SELECT KTUXEUSN,KTUXESIZ
3 FROM x$ktuxe
4 WHERE ktuxesta!='INACTIVE';
KTUXEUSN KTUXESLT KTUXESQN STATUS FLAGS KTUXESIZ
---------- ---------- -------------------------- ------------------------ ----------
13 5 47447 ACTIVE DEAD 2033516
35 29
502 ACTIVE NONE 1
sql> /
KTUXEUSN KTUXESLT KTUXESQN STATUS FLAGS KTUXESIZ
13 5 47447 ACTIVE DEAD 2033433<---该值不断变小。
35 29 502 ACTIVE NONE 1
set serveroutput on
sql> declare
2 l_start number;
3 l_end number;
4 begin
5 select ktuxesiz into l_startfrom x$ktuxe where KTUXEUSN=13 and KTUXESLT=5;
6 dbms_lock.sleep(60);
7 select ktuxesiz into l_endfrom x$ktuxe where KTUXEUSN=13 and KTUXESLT=5;
8 dbms_output.put_line('time estDay:'|| round(l_end/(l_start -l_end)/60/24,2));
9 end;
10 /
time est Day:.21