Beruflich Dokumente
Kultur Dokumente
dbatodba.com
List all process which are in lock-wait, the type of lock requested
and the process that is holding the lock queue
prompt
prompt List all process which are in lock-wait, the type of lock
requested
prompt and the process that is holding the lock queue
prompt
column username format a15
column sid format A12
column type format A4
column lmode format 990 heading 'HELD'
column request format 990 heading 'REQ'
column id1 format 999990
column id2 format 999990
break on id1 skip 1 dup
prompt
set pagesize 120
set linesize 120
select sn.username,
sn.sid||','||sn.serial# sid,
m.type,
decode(m.lmode,
1 of 3 04-06-2018, 21:53
Script to verify locks — DBA to DBA about:reader?url=http://www.dbatodba.com/oracle/problem-resolution/sc...
0,'None',
1,'Null',
2,'Row Share',
3,'Row Excl.',
4,'Share',
5,'S/Row Excl.',
6,'Exclusive',
ltrim(to_char(m.lmode,'990'))) lmode,
decode(m.request,
0,'None',
1,'Null',
2,'Row Share',
3,'Row Excl.',
4,'Share',
5,'S/Row Excl.',
6,'Exclusive',
ltrim(to_char(m.request,'990'))) request,
m.id1,
m.id2,
n.ctime,
sn.status
from v$session sn,
v$lock m,
(select id1,id2,max(ctime) ctime
from v$lock
where request=0
group by id1,id2) n
where sn.sid=m.sid and
m.id1=n.id1 and
m.id2=n.id2 and
2 of 3 04-06-2018, 21:53
Script to verify locks — DBA to DBA about:reader?url=http://www.dbatodba.com/oracle/problem-resolution/sc...
3 of 3 04-06-2018, 21:53