Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to ensure only one process accesses a record in Oracle database table
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 DBAReceived on Tue Oct 12 2004 - 04:27:08 CDT