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: deadlock

Re: deadlock

From: Alex P. Zotov <alex_at_soft-review.kiev.ua>
Date: 2000/01/25
Message-ID: <AAolPZuy90t@soft-review.kiev.ua>#1/1

Ben Grigsby <grigsby_at_inquiregroup.com> wrote in message news:388cd17d.617784837_at_news.mindspring.com...
> I am writing an app in VC6 accessing an Oracle 8i database using
> RogueWave's dbtools.
>
> My problem is that I am trying to implement row-level locking in a
> distributed applicaition by declaring a cursor for update. It does
> lock the selected row, but any other processes that try to update the
> row simply hang forever until the row is unlocked.
>
> What I need is a way for the other processes to timeout if they cannot
> get a lock for a given row.
>
> I have tried a NOWAIT statement on the end of my select..for update
> statement, but it does not help.
>
> Is there some setting in the database that I can change to prevent
> this deadlock?
>

For locking record(s) and geting error if row already locked you'd execute: select *
from table_name
where rowid = :rowid
for update nowait;

--
Alex P. Zotov
Received on Tue Jan 25 2000 - 00:00:00 CST

Original text of this message

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