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: Oracle 8 and locked rows

Re: Oracle 8 and locked rows

From: Peter Schneider <peter.schneider_at_okay.net>
Date: 1998/01/30
Message-ID: <34d2398e.6798230@news.okay.net>#1/1

On Thu, 29 Jan 1998 12:08:05 -0800, "Pascal =?iso-8859-1?Q?Paradis=2DTh=E9berge?=" <pascal_at_ia-us.com> wrote:

>I am trying to figure out if a row is a locked in a table. Can
>somebody give me a pointer?
>
>____________________________
> Pascal Paradis-Th=E9berge
> pascal_at_ia-us.com

Hi Pascal,

try

SELECT 1
  FROM your_table
 WHERE <condition for the row you want to check>    FOR UPDATE NOWAIT; If you get an 'ORA-00054 resource busy' the row was already locked in another session. If not then your're holding the lock now until you commit or rollback.

HTH
Peter

-- 
Peter Schneider
peter.schneider_at_okay.net
Received on Fri Jan 30 1998 - 00:00:00 CST

Original text of this message

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