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: Determining if a record is locked

Re: Determining if a record is locked

From: <uday.ketkar_at_dscoe.com>
Date: 1998/03/17
Message-ID: <6em8ho$iob$1@nnrp1.dejanews.com>#1/1

Hi,

Well, you have a choice now.

I guess the first process(P1) updates the record & process(P2) processes on the updated record.
If this is true then you can lock a row/table(depends on your need) with "NOWAIT" option. So, when P2 will tries to lock the table oracle will return error ora-00054 saying the table is locked by P1. It will NOT wait for unlocking the same table by P1.

If you are not processing on the updated record and just want to have an access to that table for manipulating the records other than those which is used by P1 then P1 can have "row exclusive nowait" lock. also P2 can have the same kind of lock at the same time.

Hope this will help you.
-Uday.


In article <34FDD353.EA3C92DC_at_agcs.com>,   Kent Anderson <anderske_at_agcs.com> wrote:
>
> Is there a way to tell if a record is locked without
> actually blocking on it?
>
> My situation is that we have two processes acting
> on the same tables in a database. If the first process
> updates a record, then the second process's update on that
> record will block until the first process ends its
> transaction.
>
> Is there any way for the second process to determine
> if the record is locked so it can put it off until
> later?
>
> --
> +=================================================================+
> | Kent Anderson Phone: (602) 581-4332 |
> | Engineer E-mail: anderske_at_agcs.com |
> | AG Communications Systems |
> | Phoenix, Arizona "Expand the power of you network" |

 +-----------------------------------------------------------------+

> | Visit us on the web at http://www.agcs.com |
> +=================================================================+
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Tue Mar 17 1998 - 00:00:00 CST

Original text of this message

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