大批量執(zhí)行DML語句造成回滾段大量占用,又回退操作,如何直觀查詢數(shù)據(jù)回滾情況?
單機(jī)環(huán)境 查詢回滾執(zhí)行進(jìn)度
select /*+ rule */s.sid,
r.name rr,
nvl(s.username,'no transaction') us,
s.osuser os,
s.terminal te,
t.used_urec rec,
t.used_ublk blk
from v$lock l, v$session s, v$rollname r,v$transaction t
where l.sid = s.sid(+) and
trunc(l.id1/65536) = r.usn and
l.type = 'TX' and
t.ses_addr = s.saddr and
l.lmode = 6;
單機(jī)環(huán)境 查詢回滾執(zhí)行進(jìn)度
select /*+ rule */s.sid,
r.name rr,
nvl(s.username,'no transaction') us,
s.osuser os,
s.terminal te,
t.used_urec rec,
t.used_ublk blk
from v$lock l, v$session s, v$rollname r,v$transaction t
where l.sid = s.sid(+) and
trunc(l.id1/65536) = r.usn and
l.type = 'TX' and
t.ses_addr = s.saddr and
l.lmode = 6;
集群環(huán)境 查詢回滾執(zhí)行進(jìn)度
select /*+ rule */s.sid,
r.name rr,
nvl(s.username,'no transaction') us,
s.osuser os,
s.terminal te,
t.used_urec rec,
t.used_ublk blk
from gv$lock l, gv$session s, v$rollname r,gv$transaction t
where l.sid = s.sid(+) and
trunc(l.id1/65536) = r.usn and
l.type = 'TX' and
t.ses_addr = s.saddr and
l.lmode = 6;
單機(jī)環(huán)境 查詢回滾執(zhí)行進(jìn)度
select /*+ rule */s.sid,
r.name rr,
nvl(s.username,'no transaction') us,
s.osuser os,
s.terminal te,
t.used_urec rec,
t.used_ublk blk
from v$lock l, v$session s, v$rollname r,v$transaction t
where l.sid = s.sid(+) and
trunc(l.id1/65536) = r.usn and
l.type = 'TX' and
t.ses_addr = s.saddr and
l.lmode = 6;
總結(jié)
以上所述是小編給大家介紹的Oracle回滾段使用查詢代碼詳解,希望對(duì)大家有所幫助,如果大家有任何疑問請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
您可能感興趣的文章:- Oracle7.X 回滾表空間數(shù)據(jù)文件誤刪除處理方法
- Oracle7.X 回滾表空間數(shù)據(jù)文件誤刪除處理方法
- Oracle7.X 回滾表空間數(shù)據(jù)文件誤刪除處理方法
- Oracle回滾段的概念,用法和規(guī)劃及問題的解決
- Oracle數(shù)據(jù)回滾的全過程