oracle檢視回滾的事務

qqmengxue發表於2010-09-27

透過查詢:x$ktuxe 【[K]ernel layer [t]ransaction layer [u]ndo transaction [e]ntry】

select distinct ktuxesiz from x$ktuxe where KTUXESTA='ACTIVE';
檢視恢復進度:

select * from x$ktuxe where ktuxecfl = 'DEAD' and ktuxesta = 'ACTIVE';
恢復進度
declare
l_start number;
l_end number;
begin
select ktuxesiz into l_start from x$ktuxe where KTUXEUSN=12 and KTUXESLT=40;
dbms_lock.sleep(60);
select ktuxesiz into l_end from x$ktuxe where KTUXEUSN=12 and KTUXESLT=40;
dbms_output.put_line('time est Day:'|| round(l_end/(l_start -l_end)/60/24,2));
end;
/
[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10130206/viewspace-1039007/,如需轉載,請註明出處,否則將追究法律責任。

相關文章