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: how to test locks

Re: how to test locks

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Thu, 24 Jan 2002 02:52:33 GMT
Message-ID: <RFK38.3672$jN3.6444@rwcrnsc53>


What are you trying to accomplish? Since readers don't block writers and writers don't block readers the only condition I can see where you want to see if it is locked is when you want to lock it because you are going to update it. Otherwise, what is the purpose? You could do as they suggest and if it does NOT error out (meaning you got the lock) then issue commit and release it. You could even put it in a package as a function and return 1 for locked and 0 for not locked.

Jim

"Mladen Gogala" <mgogala_at_earthlink.net> wrote in message news:pan.2002.01.23.21.06.44.54202.1011_at_earthlink.net...
> On Wed, 23 Jan 2002 07:41:34 -0500, Ganesh Raja wrote:
>
> > I have a simple question. How can i test weather a record in a table is
> >> > locked by another user without causing another lock.
> -----------------------------
> >> >
>
>
> Look at the "without causing another lock" part of the requirement and
> tell me why do you think that "select for update nowait" satisfies that
> condition?
Received on Wed Jan 23 2002 - 20:52:33 CST

Original text of this message

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