Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Locking question

RE: Locking question

From: Shevtsov, Eduard <EShevtsov_at_flagship.ru>
Date: Mon, 16 Oct 2000 15:34:45 +0400
Message-Id: <10651.119304@fatcity.com>


Hi John and List

You can check that a row has been locked just before you want to update it. I believe you can use a cursor with clause FOR UPDATE [<column list>] NOWAIT. If the row has been locked, oracle generates ORA-54. I'm not 100% sure, but I believe you could catch this error as exception

Hope this helps some

Ed

>
> HI all:
>
> Is there an easy solution to this :
>
> I have one process that has not committed and is holding a
> lock on a record.
> Process #2 wants to update the same record. Is there any
> way to tell process
> #2 to only wait X amount of time before returning an error
> or have the error
> returned immedialty? In other words if the record is
> locked, I do not want
> process #2 to wait until it is unlocked, I want to tell it
> how long to wait,
> then give me an error.
>
> thanks
>
> ____________________________________________________________________
> Get your own FREE, personal Netscape WebMail account today
> at http://home.netscape.com/webmail
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: John McCabe
> INET: johnm9563_at_netscape.net
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access /
> Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Mon Oct 16 2000 - 06:34:45 CDT

Original text of this message

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