Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Which user has obtained the Lock ???
Hi,
The statement below tries to obtain both the lock for the table and the locks for individual rows.
You can find out who is holding the lock by joining V$LOCKED_OBJECT,
DBA_OBJECTS and if needed V$SESSION. The OBJECT_ID column
in v$locked_object relates to the locked table, the name of the object can
be
gotten from dba_objects.
Regards
Karen.
anuragmin_at_my-deja.com wrote:
> Hi,
> When I query using the command
>
> select * from foo where id = 100 for update nowait;
>
> Does this statement try to obtain a table level lock or row level lock.
>
> Also If I am unable to obtain the lock using the above statement how
> do i find out which d/b user, o/s user and session has obtained the
> lock.
>
> Thanks in Advance for your help
>
> Anurag
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Fri Nov 10 2000 - 09:14:17 CST