Order of tables in synchronization script (data compare)
Janez
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
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
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...
Redgate Software