Options

Order of tables in synchronization script (data compare)

JanezJanez Posts: 21
Hi,

I am using SQL Comparison SDK for data compare (assembly version 8.5). Account (SQL authentication) that will be used to connect to both databases (source and target) will have db_owner rights in the source database, but it will only be member of db_datareader and db_datawriter roles in the target database (security policy does not allow anything else for the target database). Because of this, I suppose it will not be possible to use option to disable foreign keys in the target database before the sync. Here is my question:
Does Comparison SDK generate sync script according to the order of tables in the target database based on the relations between them?
For example, if I have Customer and Order table, will it always generate INSERT statements for Customer first and then Order and vice-versa with DELETE statements?

Thanks
Janez

Comments

  • Options
    Thanks for your post - you may have trouble unfortunately. There's no easy way to control the ordering in the way you suggest, as our sync scripts are designed to work by disabling all FK's first, inserting/updating/deleting as appropriate, then re-enabling again.

    If you can work out a correct order to do things that satisfies the keys then potentially you could work with one table at a time; but it's likely to get a bit messy...
    Systems Software Engineer

    Redgate Software

Sign In or Register to comment.