Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> concurrency Access on a table
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.deReceived on Thu Dec 18 1997 - 00:00:00 CST