Surrogate key stage with source type as DB Sequence

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
RekhaMallam1
Participant
Posts: 9
Joined: Wed Feb 06, 2008 12:13 am

Surrogate key stage with source type as DB Sequence

Post by RekhaMallam1 »

Hi
Iam using surrogate key stage in my job
surrogate stage as source
Trgt is seq file and In surrogate key i specified key type as
"source type=DB Sequence"
database DB2
In options i specified "Block Type= User Defined"
Its throwing fatal error and job is aborted..The following is the error..
DB2Driver Embedded SQL message: SQL0846N Invalid specification of an identity column or sequence object
"SEQUENCE" "SUITEADMIN.DB_SEQ". Reason code = "4". SQLSTATE=42815
sqlcode = -846;
sqlstate = 42815 [db2utils.C:228]
;

but when i specify as
"Block Type= System Defined"
Then its working well without throwing errors...(as usuall with gaps in surrogate key sequence)Why are we geting gaps and Why is this user specified block size not working....

Plz let me know the answers...
Thanks,
Rekha
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I have tried to see where the Block size can be set with the V8 Surrogate key generator and cannot find it! What block size did you specify?
RekhaMallam1
Participant
Posts: 9
Joined: Wed Feb 06, 2008 12:13 am

Re: Surrogate key stage with source type as DB Sequence

Post by RekhaMallam1 »

This is my job structure....
Iam using surrogate key with no input and output
In Key source options
"Source Action property =Create "
"source type=DB Sequence"
"database= DB2
In options
"sequence block size = userdefined"
Its throwing fatal error and job is aborted..The following is the error..
DB2Driver Embedded SQL message: SQL0846N Invalid specification of an identity column or sequence object
"SEQUENCE" "SUITEADMIN.DB_SEQ". Reason code = "4". SQLSTATE=42815
sqlcode = -846;
sqlstate = 42815 [db2utils.C:228]
;

And when runing the job by changing
"sequence block size = System Picked"

Then its working well without throwing errors...(as usuall with gaps in surrogate key sequence when using ths db sequence in other jobs to insert values)Why are we geting gaps and Why is this user specified block size not working....

Plz let me know the full answers..
Thanks,
Rekha
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Rekha - you don't need to completely repeat your first post. When I declare the stage with no inputs or outputs I do get that option, but that stage is only used to create the key, not to use it (if I understand the docs correctly).

Did you specify a block size of 1? Do you use a surrogate key stage in your job flow to actually generate keys?
RekhaMallam1
Participant
Posts: 9
Joined: Wed Feb 06, 2008 12:13 am

I cant see the whole solution...

Post by RekhaMallam1 »

ArndW wrote:Rekha - you don't need to completely repeat your first post. When I declare the stage with no inputs or outputs I do get that option, but that stage is only used to create the key, not to use it (if I ...
I cant see the whole solution sent by you...I could see just 2 line...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Premium membership will, among other benefits, let you see the entire posts of the five premium posters. Premium membership is inexpensive - less than 30c per day. All revenue from premium membership is allocated to defraying hosting and bandwidth costs incurred by DSXchange. So, by taking premium membership, you are not only gaining the benefits, you are also helping to keep DSXchange alive.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Did you specify a block size of 1? Do you use a surrogate key stage in your job flow to actually generate keys?
Post Reply