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

Re: deadlock

From: Alex P. Zotov <alex_at_soft-review.kiev.ua>
Date: Tue, 25 Jan 2000 14:49:51 +0200
Message-ID: <AAolPZuy90t@soft-review.kiev.ua>


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 - 06:49:51 CST

Original text of this message

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