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: Who locks what ?

Re: Who locks what ?

From: Bernard Polarski <bpolarsk_at_yahoo.com>
Date: Mon, 21 Feb 2000 18:52:47 GMT
Message-ID: <88s1hs$fkt$1@nnrp1.deja.com>


Hello,

I have derived a script from ?/rdbms/admin/catblock.sql. It will work, even on DB where this package is not installed and list, for each blockquee, the related info on the blocker. Usefull to remove deadlocks. It has been tested on a E10K with 300 users and response is quick.

http://www.geocities.com/bpolarsk/module2/s9/smenu_database_locks_latch_ o.txt

B. Polarski

In article <88rpu2$9so$1_at_nnrp1.deja.com>,   markp7832_at_my-deja.com wrote:
> In article <6h8s4.7$mN.511_at_nreader3.kpnqwest.net>,
> "Didier LENQUETTE" <didier.lenquette_at_steria.fr> wrote:
> > Hi !
> >
> > I manage locks into my database with SELECT ... FOR UPDATE NOWAIT.
> >
> > When a record is already locked by another user, I wish to know who
is
> > locking the record I am trying to lock, in order to display a
message
> to the
> > user, such as "User toto is locking this record".
> >
> > I know the locked objects with the v$lock view and the "locker", but
> I don't
> > know who locks a particular record !
> >
> > An idea ?
> >
> > ________________
> > Didier LENQUETTE
> > Tel : (33) 5 62 12 20 40
> > Fax : (33) 5 61 31 07 02
> >
> The only way I know to find who has a specific row locked is to
attempt
> to update the row (or select for update) without the nowait option so
> that you become lockwaited then you can use another session to
> determine the holding session.
>
> You could devise a user locking scheme using dbms_lock that could
> provide this, but I would think that the overhead would be very
> expensive.
> --
> Mark D. Powell -- The only advice that counts is the advice that
> you follow so follow your own advice --
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

--
B.Polarski

http://www.geocities.com/bpolarsk
Email : bpolarsk_at_yahoo.com

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Feb 21 2000 - 12:52:47 CST

Original text of this message

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