col name format a8
col username format a8
col osuser format a8
col start_time format a17
col status format a12
tti 'Active transactions'
SELECT username, terminal, osuser,
t.start_time, r.name, t.used_ublk "ROLLB BLKS",
DECODE(t.SPACE, 'YES', 'SPACE TX',
DECODE(t.recursive, 'YES', 'RECURSIVE TX',
DECODE(t.noundo, 'YES', 'NO UNDO TX', t.status)
)) status
FROM sys.v_$transaction t, sys.v_$rollname r, sys.v_$session s
WHERE t.xidusn = r.usn
AND t.ses_addr = s.saddr
/