KeyMgtGetNextValueConcurrent and SDKSequences

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ORACLE_1
Premium Member
Premium Member
Posts: 35
Joined: Mon Feb 16, 2009 1:19 pm

KeyMgtGetNextValueConcurrent and SDKSequences

Post by ORACLE_1 »

Hello All,

I have a question regarding KeyMgtGetNextValueConcurrent routine and SDKSequences hash file.

We have multiple DataStage projects which in some cases are loading the same dimensions. In order to properly maintain surrogate keys between projects, what I did is, I created SDKSequences hash file at a different path other than project directory and created VOC entries for this hash file for both the projects.

It is working as expected. But I am curious on what happens when two projects are trying to generate surrogate keys using KeyMgtGetNextValueConcurrent routine at the same time. My initial thought is, I will be getting a failure. To test, what I did is, with the help of my colleague I tried generating surrogate keys for the same dimension by using Test functionality of the routine and surprisingly I did not get an error. Then is my assumption that "SDKSequences hash file cannot be accessed concurrently between different DataStage projects" incorrect?

Please let me know.

Thanks in advance!!

~Prakash.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Your assumption is indeed incorrect. Take a look at the code for the routine, to see how locking is handled. A row level lock is taken and held only for the duration of the update.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply