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

Home -> Community -> Usenet -> c.d.o.misc -> concurrency Access on a table

concurrency Access on a table

From: Frank Braun <fbraun_at_rz.uni-sb.de>
Date: 1997/12/18
Message-ID: <3499a0f8.4501050@nntp.rz.uni-sb.de>#1/1

Hi.

I have to write a SQL-Script under PL/SQL 2.3.2.3.0

In this script I have to get a Primary Key (PK) for a table A from a  table ID_MANAGEMENT (IDM).

That means, every row in A has a PK which is taken out  from IDM.next_id. IDM.next_id will be updated with next_id+1.

Since several skripts may run, which want to write something in A, it could be that two Skripts read same IDM.next_id, so that they both will write something in A with same PK  (Producer-Consumer-Problem).
Is there something like a semaphore in Oracle, so that always after reading IDM.next_id it will be increased before some other instance of a script could read the same value in IDM.next_id?

Thank you very much,

bye Frank.

-- 

Frank Braun              fbraun_at_rz.uni-sb.de
Received on Thu Dec 18 1997 - 00:00:00 CST

Original text of this message

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