Finding Row Locks blocking updates
From: Colin McRae <cmcrae_at_bmerhb64.bnr.ca>
Date: 26 Apr 1994 15:27:22 GMT
Message-ID: <2pjbsq$8fu_at_bmerha64.bnr.ca>
Date: 26 Apr 1994 15:27:22 GMT
Message-ID: <2pjbsq$8fu_at_bmerha64.bnr.ca>
What query do I need to write to determine what specific user/process is locking what tables and SPECIFIC ROWS in the database. I am able to determine who is locking a table, but not what specific rows:
set verify off
accept owner char prompt 'Owner: '
accept table char prompt 'Table: '
select distinct username, terminal, program, spid
from v$process p, v$access a, v$lock l
where ownername = upper('&owner') and
tablename = upper('&table') and
p.pid = a.pid and l.pid = a.pid and l.type = 'TX';
Thanks,
Colin McRae
cmcrae_at_bmerhb64.bnr.ca
613-765-4006
Received on Tue Apr 26 1994 - 17:27:22 CEST