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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Locking

Re: Locking

From: Alex Filonov <afilonov_at_pro-ns.net>
Date: Thu, 16 Nov 2000 18:19:53 GMT
Message-ID: <8v18fv$o3f$1@nnrp1.deja.com>

Sure, just do

select null
from mytable
where <condition>
for update of <column_list>

It will lock rows on condition. Second part is tricky. Applications which are trying to lock immediate will fail with error, other applications will wait forever until lock is released. For example, second select for update with nowait option will fail, but direct update statement will wait. All ddl operations will fail too.

In article <974396521.621843_at_ernani.logica.co.uk>,   "Graham Atkinson" <g.a_at_totalise.co.uk> wrote:
> Is it possible within Oracle to lock a single record on a table so
 that any
> application attempting to update that record would get an error retruned.
> This lock needs to be present even if the database has been shutdown and
> restarted (although I could use a DBMS_JOB to kick the lock off again)
>
> Thanks,
>
> Graham.
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 16 2000 - 12:19:53 CST

Original text of this message

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