You are on page 1of 1

SELECT s.sid,s.serial#,s.username,t.used_ublk UBLK,t.

used_urec UREC
FROM V$TRANSACTION t, V$SESSION s
WHERE t.addr = s.taddr;

SID USERNAME UBLK UREC


---------- ------------------------------ ---------- ----------
908 DSL_AIM_APPL 66 3012
1282 INFA_RO 1 1
714 AUTOMATE 1015876 11974069
1224 2 5
965 INFA_RO 1 1

In the above output look for sid having abnormally huge value of UBLK and UREC

SID 714 was consuming the max undo

Below quey will tell you undo consumption

select tsu.tablespace_name, ceil(tsu.used_mb) "size MB"


, decode(ceil(tsf.free_mb), NULL,0,ceil(tsf.free_mb)) "free MB"
, decode(100 - ceil(tsf.free_mb/tsu.used_mb*100), NULL, 100,
100 - ceil(tsf.free_mb/tsu.used_mb*100)) "% used"
from (select tablespace_name, sum(bytes)/1024/1024 used_mb
from dba_data_files group by tablespace_name union all
select tablespace_name || ' **TEMP**'
, sum(bytes)/1024/1024 used_mb
from dba_temp_files group by tablespace_name) tsu
, (select tablespace_name, sum(bytes)/1024/1024 free_mb
from dba_free_space group by tablespace_name) tsf
where TSU.TABLESPACE_NAME = TSF.TABLESPACE_NAME (+)
and TSU.TABLESPACE_NAME like 'UNDOTBS%'
order by 4 desc;

You might also like