Is there a known issue with comparing data between tables where the primary key is the identity? The generated script failed to cope with this:

Cannot insert explicit value for identity column in table
'FrequentlyAskedQuestions' when IDENTITY_INSERT is set to OFF.
cook0002
0

Comments

4 comments

  • richardjm
    I can't think of anybody reporting a problem like that. Have you reviewed your project configuration options to make sure they are sensible?

    What are the schema for the tables on the different database and what indexes are configured?

    It should work.

    Just a note I'll be closing this forum probably this week as the RC is due out very soon.

    HTH
    richardjm
    0
  • cook0002
    Comparing database to database (SQL2000) an insert against a table with an identity primary key turns IDENTITY_INSERT on before inserting records. Against the backup, it does not, leading to the error when I try and run the generated script against the source database. At least that's the case for me. I can't find where I would explicitly have turned that off, nor can I understand why that would be default behaviour.
    cook0002
    0
  • richardjm
    The SQL that is generated when targeting a database is not guaranteed. This is mainly due to us not fully populating all of the dependency information or foreign keys so they may not be turned off.

    Also as you've noticed we don't disable identity columns.

    We'll look into improving this for the point release.

    Good bug :)
    richardjm
    0
  • richardjm
    Actually having a quick check we seem to have fixed the IDENTITY_INSERT for targeting a backup.

    Please check out the release candidate which will come out very soon.
    richardjm
    0

Add comment

Please sign in to leave a comment.