oracle查询数据回滚情况
来源:爱站网时间:2022-10-31编辑:网友分享
我们今天来总结一下有关于oracle查询数据回滚情况内容,这对日后进行技术查询操作有直接联系,感兴趣的朋友应该可以读懂明白爱站技术频道小编收集的内容。
大批量执行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查询数据回滚情况文章还不错的话,可以来关注下我们网站,为了让大家学习到更多有趣的技术文章内容,爱站技术频道小编每天都会不定时更新。
上一篇:oracle虚拟数据库介绍