Ignore identity seed doesn't work with other changes

dspdsp Posts: 26
edited January 28, 2014 10:52AM in SQL Compare Previous Versions
I found out that renaming a column with an identity seed caused the identity to change.

db1: orgName int identity(500,1)
db2: orgName int identity(3000,1)

rename at db1: newName int identity(500,1)
After sql compare the column at db2 should be newName int Identity(3000,1), but it turned 500,1.

Danny Springer

Comments

  • Anu DAnu D Posts: 876 Silver 3
    Many thanks for your post and apologies for inconvenience caused.

    We have logged a support call and would like to investigate this issue further.

    I will email you with few more questions.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • Anu DAnu D Posts: 876 Silver 3
    As per our live chat it is SQL Compare's feature that allows to ignore the identity seed and increment value during comparison but SQL Compare will not ignore the settings during deployment.

    Hope this answers your question.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • It looks like the seed value depends on the presence of a primary key or not. If for some reason, the Identity key is not a primary key, the process that sets the DBCC CheckIdent (tablename,RESEED,0) does not get processed properly when you are not running the wizard in the table by table section but attempt to run it from the first tab ("Data Sources"). Try running from the tab that says "Tables and Views" and mark the column as an identity column. Otherwise, when not a primary key, the program does not seem to recognize that there is an identity column in the field. Or perhaps the Ignore Identity property is the default but it is over-ridden in the Tables and Views tab section. I can't quite figure out which but I do know that if I run from the Tables and Views, it seems to reset the identity if I check the box on the table that has an identity set. Seems to me to be counter-intuitive. I would think that if the table has an identity set, it should automatically reset that value.
Sign In or Register to comment.