Find which users are using and how much UNDO is being used ?


Goal:
How do you determine which users are using and how much UNDO is being used?
Solution:
select a.sid, a.serial#, a.username, b.used_urec, b.used_ublk
from v$session a, v$transaction b
where a.saddr=b.ses_addr;

EXAMPLE:

SQL> select a.sid, a.serial#, a.username, b.used_urec, b.used_ublk
  from v$session a, v$transaction b
  where a.saddr=b.ses_addr;
SID SERIAL# USERNAME USED_UREC USED_UBLK
---------- ---------- ------------------------------ ---------- ----------
21 7856 KBCOOK 1 1
USED_UBLK = Number of undo blocks used
USED_UREC = Number of undo records used

No comments:

Post a Comment