Issues synchronizing to snapshot for tables with FKs
jfleming
Posts: 4
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
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.
Redgate Software
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.
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.