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: How to ensure only one process accesses a record in Oracle database table

Re: How to ensure only one process accesses a record in Oracle database table

From: Sybrand Bakker <sybrandb_at_hccnet.nl>
Date: Tue, 12 Oct 2004 11:27:08 +0200
Message-ID: <no8nm0pj5q0cn2ho2helt288jl4e26siu4@4ax.com>


On 12 Oct 2004 00:27:46 -0700, aone1504_at_yahoo.com (Srini) wrote:

>We have multiple processes running in parallel accessing the same
>database table in Oracle. The processes access the table thru a
>trigger and a stored procedure written for the trigger.
>
>We want only one process to pick a record and update it with a status.
>
>Is it possible to lock a record in Oracle ? Can any one tell me how we
>can achieve this?
>
>Thanks,
>Srini

Records are automatically locked.
You seem to need a table level lock, consequently severely limiting the scalability of your application. You can lock a table by issuing the lock table statement, in your case in exclusive mode. Note: this will not prevent records to be read.

--
Sybrand Bakker, Senior Oracle DBA
Received on Tue Oct 12 2004 - 04:27:08 CDT

Original text of this message

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