Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Locks

Re: Locks

From: Jeremiah Wilton <jeremiah_at_wolfenet.com>
Date: Mon, 14 Sep 1998 22:25:53 -0700
Message-ID: <Pine.OSF.3.95.980914222305.24636A-100000@gonzo.wolfenet.com>


On Sat, 12 Sep 1998 calberto_at_my-dejanews.com wrote:

> How can I identify which user is holding(locking) resources that another user
> wants to use? I have queried V$LOCKED_OBJECT but it shows all the tables some
> user is locking, regardless if another is trying to access it at the same
> time or not. I only want to know if some user is waiting (being blocked) for
> another user. Is there any status in any of these dictionary tables, like
> V$LOCKED_OBJECT, V$LOCK and V$SESSION.

To find the blocker, someone (obviously) must be waiting on the enqueue.

select s.sid, osuser, client_info, etc.. from v$session s, v$lock l
where s.sid = l.sid
and block = 1;

OR...

select sid from v$lock where block = 1;

--
Jeremiah Wilton http://www.wolfenet.com/~jeremiah Received on Tue Sep 15 1998 - 00:25:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US