Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: deadlock problem
Do the following:
select * from tablexx where xx=1 for update nowait;
the second select will get at once the error: ORA-00054: resource busy and acquire with NOWAIT specified
Ben Grigsby wrote:
> I am using VC6 to access an Oracle 8i database using RogueWave's
> dbtools.
>
> My problem is that I am trying to implement row-level locking by
> declaring a cursor for update. It does lock the row, but the deadlock
> occurs whenever any other process tries to access the same row. The
> second process waits indefinately until the row is unlocked.
>
> Is there any way to set a timeout so that other processes will not
> hang forever?
>
> TAI
>
> Ben Grigsby
> grigsby_at_inquiregroup.com
--