Sql-server – SQL Server 2008: Diff table data on different servers with exact schema

sql serversql-server-2008sql-server-tools

I'm trying to find a good open source tool that simply compares data in a database on one server to a table (of the same schema) on another server. Then I want to generate INSERT statements for the rows that are different, for either the source or destination/target table.

I've tried downloading several tools, and I can't get any of them to work because they all had bugs. I can be more specific with the errors I received if you need me to be.

I've tried:

TableDiffGui.zip
SqlDiffFramework setup 1.0.3.0.exe
SqlTableCompare.zip
DaBCoS.0.3.2163.zip

If there is a manual way to do this, please let me know. My last resort will be to simply write a program that does it.

Best Answer

Is creating a linked server on one of those an option? If so you could probably do this using something similar to the following query (untested):

INSERT INTO Server1.db1.dbo.Table1
SELECT * FROM dbo.Table2
EXCEPT
SELECT * FROM Server1.db1.dbo.Table1

If not, then maybe take a look at SQL Server replication

Related Question