Sql-server – a free tool to compare two SQL Server Databases?

sql-server

What is a free tool to compare two Sql Server tables (data and schema).

It would be great if the tool can script the differences found.

I also went through some older posts. The closest I have seen is SQLDBDiff but I would love to try more options.

Best Solution

TableDiff.exe should have everything you need. It is one of the hidden gems in SQL Server 2005. So you don't have to download anything.

• Table Difference tool allows you to discover and reconcile differences between a source and destination table or a view. Tablediff Utility can report differences on schema and data. The most popular feature of tablediff is the fact that it can generate a script that you can run on the destination that will reconcile differences between the tables. TableDiff.exe takes 2 sets of input; • Connectivity - Provide source and destination objects and connectivity information.

• Compare Options - Select one of the compare options • Compare schemas: Regular or Strict

• Compare using Rowcounts, Hashes or Column comparisons

• Generate difference scripts with I/U/D statements to synchronize destination to the source. TableDiff was intended for replication but can easily apply to any scenario where you need to compare data and schema. You can find more information about command line utilities and the Tablediff Utility in Books Online for SQL Server 2005.