Welcome to EMC Consulting Blogs Sign in | Join | Help

SSIS Junkie

TableDiff utility

I work predominantly in the data integration space and I suspect most of you reading this do too. One of the most common data integration scenarios is discovering what records in one table don't exist in another and I have previously written about how to achieve that in my tool of choice, SQL Server Integration Services.

Recently another tool provided with SQL Server, primarily for replication scenarios, was brought to my attention. Its called TableDiff.exe and is a command-line tool that quite simply shows you the differences between two tables.

By default TableDiff.exe is stored at %ProgramFiles%\Microsoft SQL Server\90\COM.  What I really like about it is that it has the ability to generate SQL statements that when executed will ensure two tables with matching metadata contain the same data. So, if you run this comparison between a populated table and an empty table it will generate all the insert statements that you need to recreate the populated table. That is functionality that is sorely missing from any other tool provided with SQL Server and which, up to now, I have always achieved using sp_generate_inserts.

Read more about TableDiff here.


Published Wednesday, August 08, 2007 1:55 AM by jamie.thomson



University Update - Microsoft SQL Server - TableDiff utility said:

August 8, 2007 7:48 AM

Jason Haley said:

August 8, 2007 3:07 PM

CoqBlog said:

Je viens de voir dans un post de Jamie Thomson une manière d'utiliser TableDiff qui ne m'avait même pas

August 10, 2007 11:40 PM

Mladen said:

Hey Jamie!

Just in case you haven't seen it yet,

i've created a simple little GUI for tablediff:


August 22, 2007 7:05 AM
New Comments to this post are disabled

This Blog


Powered by Community Server (Personal Edition), by Telligent Systems