DB LOCK 걸린것을 확인하는 쿼리문

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
SELECT   
username un, osuser ou, s.SID SID, s.serial# ser, l.TYPE ty,
DECODE (lmode,
1, 'NONE',
2, 'RS',
3, 'RX',
4, 'S',
5, 'RSX',
6, 'X'
) mh,
o.NAME ob, id1,
DECODE (request,
1, 'NONE',
2, 'RS',
3, 'RX',
4, 'S',
5, 'RSX',
6, 'X'
) mr
FROM v$lock l, v$session s, SYS.obj$ o
WHERE l.SID = s.SID AND l.id1 = o.obj#(+) AND username IS NOT NULL
ORDER BY SID
Share