SQL Data Compare attempting to set IDENTITY columns to NULL
kevin_bkt
Posts: 3
I am using SQL Data Compare 10.2.3.5. We use the tool regularly to save changes to data made by individual developers, and then apply those changes to other environments. Our databases are SQL Server 2005/2008.
Now I'm trying to generate a database from scratch from source control, instead of applying incremental changes. The target database is empty, and there are about 24000 differences to be applied. When I deploy, I get the error "DEFAULT or NULL are not allowed as explicit identity values".
Looking at the deployment script, I can see that SQL Data Compare is trying to set the value of identity columns in several (but not all) tables to NULL. In the .sql data files in source control, the INSERT statements do not store any value for the identity columns (as I think it should be). Yet these NULLs are generated at deployment time. I've tried using the re-seed identity columns option, but this makes no difference.
I would appreciate anyone who could point me in the right direction on this. Right now, I'm looking at having to edit a very large number of changes in the deployment script to get this database created.
Thanks,
Kevin
Now I'm trying to generate a database from scratch from source control, instead of applying incremental changes. The target database is empty, and there are about 24000 differences to be applied. When I deploy, I get the error "DEFAULT or NULL are not allowed as explicit identity values".
Looking at the deployment script, I can see that SQL Data Compare is trying to set the value of identity columns in several (but not all) tables to NULL. In the .sql data files in source control, the INSERT statements do not store any value for the identity columns (as I think it should be). Yet these NULLs are generated at deployment time. I've tried using the re-seed identity columns option, but this makes no difference.
I would appreciate anyone who could point me in the right direction on this. Right now, I'm looking at having to edit a very large number of changes in the deployment script to get this database created.
Thanks,
Kevin
Comments
If you could update to that version and let me know if you're still seeing this issue that'd be great - you can update from within the tool by going to Help->Check for Updates.
Red Gate Technical Support Engineer
Next chance I have, I will try what you suggest, but don't know when that will be.
Red Gate Technical Support Engineer