

GenerateFixSQLScriptSub.bat: This DOS shell program will compare the source and destination table and generate the FIXSQL script file using TableDiff utility.

GenerateFixSQLScriptMain.bat: This main DOS shell program will loop through a list of tables (to be synchronized) and for each table it will call GenerateFixSQLScriptSub.bat to generate the FixSQL script and append them as a single CompleteFixSQL.sql. We have implemented this method using the following DOS batch files: Download Data Synchronization using TableDiff utility - 32.19 KB.sqlcmd utility can be used to run that script file ( CompleteFixSQL.sql) into the destination server to bring the source and destination tables into convergence. At end of the loop, we have a complete script file that needs to be executed at destination server. Within the loop, we have to accumulate (i.e., append) the generated Transact-SQL script into a local file (say CompleteFixSQL.sql).


Since this utility compares one table at a time, we need to call it in a loop in case we have N number of tables to synchronize. We can use TableDiff utility to generate a Transact-SQL script (containing delete/ insert/ update statements) to fix discrepancies at the destination server to bring the source and destination tables into convergence. Method-I: Data Synchronization using TableDiff Utility This article provides various methods to resolve this problem. These days, most of the low-budget Window application projects are developed with SQL Express edition where this limitation obstructs the user to move further when their application requires DTS. SQL Server Express Edition is a free version DBMS which does not have Data Synchronization (DTS) feature.
