您好,登錄后才能下訂單哦!
大批量執行DML語句造成回滾段大量占用,又回退操作,如何直觀查詢數據回滾情況?
單機環境 查詢回滾執行進度
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;
單機環境 查詢回滾執行進度
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;
集群環境 查詢回滾執行進度
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;
單機環境 查詢回滾執行進度
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;
總結
以上所述是小編給大家介紹的Oracle回滾段使用查詢代碼詳解,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對億速云網站的支持!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。