Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Locking: Matching up sessions
If you have access to the Oracle Enterprise Manager toolkit, Lock Manager
shows you who is locking who (and it's easy to use!).
<markp7832_at_my-deja.com> wrote in message news:7qogp1$b49$1_at_nnrp1.deja.com...
> In article <37CF7DA4.24C3_at_oriolecorp.com>,
> sfaroult_at_oriolecorp.com wrote:
> > Ben Ryan wrote:
> > > Imagine three sessions are each updating a single row in
> > > the table and none of them have yet commited the change.
> > > Call the sessions A, B and C. Let us say
> > > A is updating r1
> > > B is updating r2
> > > C is updating r3.
> > >
> > > Imagine two more sessions called x and y. Which,
> > > are both trying to a update a single row in the table
> > > and they were both initiated after sessions A, B and C
> > > had acquired their locks. Lets us say that
> > > x is trying to update r1 and
> > > y is trying to update r2.
> > >
> > > By querying v$lock.id1 I can see how to say that
> > > some combination of sessions A, B and C are blocking
> > > sessions x and y.
> > >
> > > Is there anyway to discover that
> > > A is blocking x and
> > > B is blocking y
> >
> > If I remember well, in V$LOCK you have not only locks which are held
> but
> > also those which are requested. There is in $ORACLE_HOME/rdbms/admin
> (I
> > assume a Unix box!) a script or two which give a better depiction of
> > locking than the raw V$LOCK. I think there are utlsomething.sql
> scripts,
> > assuming Unix once again try a grep -i blocking *.sql on the said
> > directory I am sure there is something. You can also search for
> scripts
> > on a number of sites; we have a monlocks.sql for lock monitoring on
> our
> > site although to be honest I don't remember what it displays exactly.
> > --
> > Regards,
> >
> Since version 7.2 the v$session table has contained columns that nmake
> up the rowid of a waited row: row_wait_* Try looking at them.
>
>
>
> >
![]() |
![]() |