Page 1 of 1

surrogate key generating off numbers

Posted: Fri Jun 26, 2015 9:40 am
by Damonsal
I am developing a new job to an existing target table. I decided to initialize the seq with max+1 value to skey file and do an update/insert into the table, so created job to load the data to the target table, whenver there is no lookup found i generate the SKey from the utility, data is generated correctly. but i see the Skey generation is generating numbers which are less than the max
+1 value which i set in intialization stage. please advice the workaround.

Posted: Mon Jun 29, 2015 1:58 am
by ArndW
The surrogate key generator will always generate numbers that are higher than the previous call or the initial value setting. If this is not the case, then check your initial value setting and perhaps that did not work as you expected.
Try running your sequence or job that sets the surrogate key minimum. Then write a dummy job which gets the next value and writes it to a peek or a flat file and check that value.