Issues synchronizing to snapshot for tables with FKs

jflemingjfleming Posts: 4
edited May 5, 2011 9:47AM in SQL Compare Previous Versions
I have a nightly process that creates snapshots for developers to use to create DB change scripts for propduction. We have an issue where if a table is referenced by a Foreign Key, the synchronization script generated based on the snapshot does not see the dependency when trying to alter the PK on the child table, and so generates a synch script that fails. If I run the compare directly against the prod DB, it generates a script which works properly.

Comments

  • James BJames B Posts: 1,124 Silver 4
    Hi, thanks for your post.

    When you refer to "snapshot", do you mean a SQL Compare generated one?
    This should be all but identical to the source DB (at least relating to the comparison). What version of SQL Compare are you using? If you compare the snapshot to the source DB it was generated from, does this show any difference or are they listed as identical? An example from your script might be useful too.

    If you don't want to post that info here, you can mail support directly, quoting F0047505 in the subject line.
    Systems Software Engineer

    Redgate Software

  • Yers, I am using a snapshot generated by RedGate SQL Compare 8.2.

    I can use the snapshot to generate a database with no differences at all. I then do a compare against a scripts folder. If I use the DB I created from the snapshot, it finds all the dependencies and everything works. If I use the snapshot itself, however, it fails to find the dependency between the PK and the FK, and generates a script that fails. I will e-mail with the items in question, since it's a lot of scripts and tables for my snapshot.
  • Yers, I am using a snapshot generated by RedGate SQL Compare 8.2.

    I can use the snapshot to generate a database with no differences at all. I then do a compare against a scripts folder. If I use the DB I created from the snapshot, it finds all the dependencies and everything works. If I use the snapshot itself, however, it fails to find the dependency between the PK and the FK, and generates a script that fails. I will e-mail with the items in question, since it's a lot of scripts and tables for my snapshot.
Sign In or Register to comment.