forked from geekcomputers/Oracle-SQL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactive_rollback.sql
More file actions
20 lines (18 loc) · 561 Bytes
/
active_rollback.sql
File metadata and controls
20 lines (18 loc) · 561 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
REM Script Name : active_rollback.sql
REM Author : Craig Richards
REM Created :
REM Last Modified :
REM Version : 1.0
REM
REM Modifications :
REM
REM Description : Shows active rollback segments
SELECT SUBSTR(r.name,1,5) RSN,s.sid SID, SUBSTR(nvl(s.username, 'No Tran'),1,7) USR, s.osuser OSUSR, s.terminal TERM, o.rssize/(1024*1024) RSIZE
FROM v$lock l, v$session s, v$rollname r, v$rollstat o
WHER l.sid = s.sid(+)
AND TRUNC(l.id1/65536) = r.usn
AND o.usn = r.usn
AND l.type = 'TX'
AND l.lmode = 6
ORDER BY r.name;
REM End of Script