Page 1 of 1

Surrogate key stage with source type as DB Sequence

Posted: Tue Mar 11, 2008 1:30 am
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

Posted: Tue Mar 11, 2008 2:29 am
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?

Re: Surrogate key stage with source type as DB Sequence

Posted: Tue Mar 11, 2008 3:55 am
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

Posted: Tue Mar 11, 2008 4:07 am
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?

I cant see the whole solution...

Posted: Tue Mar 11, 2008 7:21 am
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...

Posted: Tue Mar 11, 2008 5:55 pm
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.

Posted: Wed Mar 12, 2008 4:55 am
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?