TableDiff in Sql Server 2005


TableDiff is a great tool to compare the content of tables with the same structure. It is part of replication tools, but can be used for other purposes as well.

This is the requirement of the tool, as spelled out in this error message: The replication table difference tool requires the comparison tables/views to have either a primary key, identity, rowguid or unique key column.

Here is a sample statement:

C:\Program Files\Microsoft SQL Server\90\COM>tablediff -sourceserver SourceInstance -sourcedatabase SourceDb -sourceschema dbo -sourcetable t1 -destinationserver DestinationInstance -destinationdatabase Test2 -destinationschema dbo -destinationtable t1 -f c:\tablediff.sql

,

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.