Re: Transaction isolation / locking

From: Dave Fowler <d.fowler_at_smmj.com>
Date: Fri, 04 May 2001 13:50:50 GMT
Message-ID: <_syI6.1388$Hk.121982_at_newsread2.prod.itd.earthlink.net>


Rene,
  Users that have uncommited data will lock behind each other on the same row. First user commits lock frees.

Doing a select with the FOR UPDATE clause NO WAIT. Check SQL Reference on SELECT.
No data would come back on the select to update. SQLCode returned?

hth,
Dave Fowler

"René Laursen" <rene_at_ssv.dk> wrote in message news:9crsdb$a6l$1_at_news.cybercity.dk...
> Quote from Oracle SQL Ref:
> "READ COMMITTED is the default Oracle transaction behavior. If the
> transaction contains DML that requires row locks held by another
> transaction, then the DML statement waits until the row locks are
 released."
>
> Doesn't this lead to deadlock-situations ?
>
> What do I do If I want to reject a DML-statement if there is an
 uncommitted
> update on the same row(s) .
> ( I think this is called Read Committed/No Wait in Interbase)
>
> I want to create a function which checks if it is possible to start an
> exclusive update of some row(s), i.e. I want the function to refuse the
> update if another user is in the process of doing this on the same row(s).
> (A kind of pessimistic locking actually).
> How can I do this ?
>
> René Laursen
>
>
Received on Fri May 04 2001 - 15:50:50 CEST

Original text of this message