Feature Request: Option to purge dependencies

DAndres109@aol.com[email protected] Posts: 22 Bronze 2
Hi,

When synchronizing between source and target tables, I believe that it is possible for the operation to fail if target records exist that cause foreign key violations.

Can you add an option that will force the removal of these records?

Thanks,

David Andres

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi and thanks for your post.

    In SQL Data Compare, the updates are organized by table, so if there is a foreign key constraint between two tables being synchronized, there is a high possibility that there will be a constraint violation at some point during the synchronization, even though the end result will be consistent data.

    In Data Compare, we address this by providing you with the option to disable foreign keys. When this option is used, the key is dropped or disabled before synchronization and put back at the end. This approach seems to be working very well in most cases, but if the data in the source doesn't conform to the constraint, it will be the same in the target of the synchronization because at least last time I looked into this, the key is recreated WITH NOCHECK.

    Hopefully this gives you a bit more confidence that Data Compare will do the job properly for you.
  • Brian,

    Can you confirm if the keys are dropped and recreated for ALL dependent objects or only for those that are explicitly included in the sync by the user?

    Thanks,

    David
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi David,

    The foreign keys that will be modified will only be the ones defined on objects being synchronized. When the database is registered by Data Compare, part of that process is to work out a dependency matrix so that the software knows which constraints belong to certain tables.
Sign In or Register to comment.