Page 1 of 1

Maintaining Surrogate key

Posted: Wed Aug 11, 2010 11:50 am
by das_nirmalya
Using NextkeyGen() to create and insert surrogate key in target table . Jobs are in schedule. But due to regular insert surrogate key value exceeding the column limit . So its not able to insert data in table.

What is the process should i use in project to refresh the surrogate key values keeping data consistency and integrity within the tables.

Posted: Wed Aug 11, 2010 11:54 am
by chulett
Sounds like you should make your surrogate key columns larger in your tables. How are they defined now?

Posted: Wed Aug 11, 2010 12:17 pm
by das_nirmalya
chulett wrote:Sounds like you should make your surrogate key columns larger in your tables. How are they defined now? ...
Sure , its a process to overcome this issue. But i want a permanant solution like- it refresh all the surrogate key values , again re-generate it from starting

Posted: Wed Aug 11, 2010 12:25 pm
by kris007
The permanent solution is to increase your column length.
again re-generate it from starting
That won't help you maintaining the integrity among the tables.

Posted: Wed Aug 11, 2010 12:25 pm
by chulett
First define what you mean by "refreshing", generally rolling over a surrogate and starting to reuse them is not a good idea so I assume you mean something else.

ps. That really should be the permanent solution as well, properly sized key values should never overflow... unless we're talking about gi-nor-mous amounts of records here?