Page 1 of 1

Surrogate Key generation in SQL Server

Posted: Tue Nov 03, 2009 2:40 pm
by pratapsriram
We have a requirement to implement a Type1 SCD for SQL server database. Has anyone implemented a Surrogate key generation for SQL server in Enterprise edition for SQL server 2008 in windows environment? Can anyone suggest me the best approach for implementing Surrogate Key generation for the above scenario? I am exploring the SCD stage and Key Generation stage but the database options show only DB2 and Oracle. So can we use SCD stage for sql server for Surrogate Key generation?
Thanks for your replies.

Posted: Tue Nov 03, 2009 3:45 pm
by ray.wurlod
Only if your surrogate key is an integer and you're using a state file. The state file can be initialized from any source.

If you're using GUID for the keys, then you need to go back to the database using a query to generate these.