surrogate key

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
femil
Participant
Posts: 27
Joined: Mon Nov 02, 2009 10:54 am
Location: chennai

surrogate key

Post by femil »

how can i create a surrogate key in data stage for a target table in which records are inserted by two passive stages
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Use the routine "KeyMgtGetNextValueConcurrent" in both streams or use a database surrogate key (i.e. a database sequence).
ramu1
Participant
Posts: 14
Joined: Mon May 12, 2008 12:47 am

Generating Sequence value

Post by ramu1 »

Hi Friends,
We can use Keymgmtgetnextval also to create sequence values.

What is the difference between Keymgmtgetnextval and KeymgmtgetnextvalConcurrent?

Thanks&Regards
Ramu
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The difference is in persistence of the lock on the sequence. Review the source code of each routine to ascertain the difference.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Right, the 'Concurrent' part is a big clue and the long descriptions of each explain the difference between the two.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply