Sequence number issue

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
dnat
Participant
Posts: 200
Joined: Thu Sep 06, 2007 2:06 am

Sequence number issue

Post by dnat »

Hi,

I have a job where i am generating the sequence number through KeyMgtGetNextValueConcurrent('N') and storing in unique id.

The job.invocation id aborted with ORA-00001: unique constraint violation on the unique id index.

When i check the current max value of the database and the value in SDKSequences file, the SDKSequences file contains one value greater than the database value. Looks like no issue with the sequence number generation.

I am wondering what could be the reason for this unique constraint violation.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The key in SDKSequences obviously got out of synchronization with the key of the Oracle table, or perhaps you are not using the correct sequence name in your KeyMgtGetNextKey() call.
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

Re: Sequence number issue

Post by chulett »

dnat wrote:I am wondering what could be the reason for this unique constraint violation.
So are we, and it's not really a question we can answer for you other than to state what Ray did. The routine has no clue if some other process has already issued a given number or not, it just assures that it only hands a number out once.

You'll need to do the investigation, find out where the records you collided with came from.
-craig

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