Mladen Prajdić Blog

Blog about stuff and things and stuff. Mostly about SQL server and .Net

SQL Server 2005: TableDiff.exe GUI

Some time ago i've written about the TableDiff.exe utility. It's a great tool for quick table comparisons and i've grown tired of typing it in the command line.

That's why I created this simple TableDiff GUI to help me along and i've decided to share it with the world. :)

 

You can download it here.

 

Hope you find it usefull.

 

kick it on DotNetKicks.com

Legacy Comments


David
2007-08-13
re: SQL Server 2005: TableDiff.exe GUI
Screenshot would be nice! :)

.Net Adventures
2007-08-13
re: SQL Server 2005: TableDiff.exe GUI
Take a look at this url http://devintelligence.com/blogs/netadventures/archive/2007/08/13/ui-for-ms-sql-server-tablediff-tool.aspx to see the screenshot .

Chris Pietschmann
2007-08-14
re: SQL Server 2005: TableDiff.exe GUI
Where's the source code?

Mladen
2007-08-14
re: SQL Server 2005: TableDiff.exe GUI
i didn't post the source code.
you can use reflector to see it.

Dan
2007-08-15
re: SQL Server 2005: TableDiff.exe GUI
Thanks ! Very useful :)

Bill
2007-08-16
re: SQL Server 2005: TableDiff.exe GUI
The webpage shows "Server Error in '/' Application.", and the GUI exe never shows a GUI.

Mladen
2007-08-16
re: SQL Server 2005: TableDiff.exe GUI
emm... what are you talking about, Bill?

what webpage?

Normajean
2007-08-16
re: SQL Server 2005: TableDiff.exe GUI
Great job! Thanks for sharing :-)

Michael David Austin
2007-08-21
Great Utility, Thanks for posting
Thanks for posting this valuable tool. It is always nice to have a GUI wrapper for command line tools with a lot of powerful options!

Just Don't Know
2007-08-30
re: SQL Server 2005: TableDiff.exe GUI
Thanks for the tool, works like a charm. This is a good way to transfer data between databases on different servers, such as qa to prod, where typically you cannot link them due to network restrictions.

Mladen
2007-08-30
re: SQL Server 2005: TableDiff.exe GUI
glad you like it!

Jen
2007-08-30
re: SQL Server 2005: TableDiff.exe GUI
Will this work on SQL 2000?

Jen

Mladen
2007-08-30
re: SQL Server 2005: TableDiff.exe GUI
since tablediff.exe works on 2000 this will too :)
how ever tablediff.exe comes with sql server 2005.

Lee
2007-11-02
re: SQL Server 2005: TableDiff.exe GUI
Just curious...what needs to be done in regards to get this to work...I have both the tablediff.exe and the tablediffGUI.exe on my computer and am attempting to connect to a server...each time I try to connect either via the SA or via Win Auth I get a failed to connect message...

It would be a little helpful to know some of the workings and how this tries to connect...

Do you need a DSN or anything to connect to the server? does something on the server need to be enabled?

Also a little constructive criticism...it doesn't appear to be any error handling in regards to blank fields...the couple of times I messed around with this it still allowed you to run the tablediff even if you didn't have all the fields entered which basically had my machine locked up...

Looks like a great tool I just wish I could get it to work !!!

Mladen
2007-11-02
re: SQL Server 2005: TableDiff.exe GUI
well you have to tell the gui where the tablediff.exe is.
also try running it on the servers since tablediff.exe was never meant
to be run on the client.

i've added only most basic error handling to blank fields
what gui does is simply build the cmd string and runs the tablediff.exe

Lee
2007-11-02
re: SQL Server 2005: TableDiff.exe GUI
ah...ok I will have to get the server up to the correct version of .NET as it is calling for v2...

I will give that a try

Bigpa
2007-11-07
re: SQL Server 2005: TableDiff.exe GUI
What's with all the abrupt comments ! Efforts appreciated sir

Peter Brighton
2008-01-10
re: SQL Server 2005: TableDiff.exe GUI
Greetings.

The gui applications looks like a good easy way to go however i am having a few problems.

The gui comes up and allows me to enter connection info but i get the following message on attempting to connect.

"Failed to retrieve data for this request."

The connection info is correct as far as i can tell and i can connect to the db through server manager.

any clues suggestions etc...

thanks

Peter

NFG
2008-01-11
re: SQL Server 2005: TableDiff.exe GUI
Oh so sweet. Nice job.

AJ
2008-01-31
re: SQL Server 2005: TableDiff.exe GUI
Thank you for this. great job!

Karthikeyan Kannan
2008-02-06
re: SQL Server 2005: TableDiff.exe GUI
Thanks n really a gr8 work, but i am not able to generate the SQL Syn Scripts using the tool (even i hav tried in command prompt). Can any one help me out in generating the differential scripts using this tool? reply asap...

jeff
2008-02-26
re: SQL Server 2005: TableDiff.exe GUI
How do you specify an alternate port in TableDiffGui ?

fakeDBA
2008-03-05
re: SQL Server 2005: TableDiff.exe GUI
OK, what id I have a bunch of tables .... how can we work abt it ...

jay
2008-04-14
re: SQL Server 2005: TableDiff.exe GUI
what about omitting a unique column, theres no way to omit columns and compare the rest. I have a date column on my 2 tables and when i compare both it says every row is deifferent because both tabels have a diffent date yet the data in the other columns are identical. If i could only be able to omit the date columns and compare the rest this would work better.

pippo
2008-04-22
re: SQL Server 2005: TableDiff.exe GUI
Where can I download tablediff.exe?

Mladen
2008-04-22
re: SQL Server 2005: TableDiff.exe GUI
tablediff.exe is a tool that comes with sql server. it's also installed on the server.
it can't be downloaded by itself.

pippo
2008-04-22
re: SQL Server 2005: TableDiff.exe GUI
I installed SQL server 2005, and SP2, but I have not tablediff.exe in my server.
Where can I find it?

Mladen
2008-04-22
re: SQL Server 2005: TableDiff.exe GUI
"C:\Program Files\Microsoft SQL Server\90\COM\TableDiff.exe"
or in another directory than the C:\Program Files\ depending on your install path

i don't know if it comes with the sql server express version.

Rob Bohn
2008-05-03
re: SQL Server 2005: TableDiff.exe GUI
My laptop with SQL Server Express has tablediff.exe

Luigi VISINTIN
2008-05-05
re: SQL Server 2005: TableDiff.exe GUI
I've found this tool and think it will be useful for me, but I didn't succeed to run it. I have Sql2000 on my Development Server W2k3, and tablediff.exe runs well from command line, but tablediffgui.exe won't. After specifying the path for tablediff.exe I try to connect to my LOCAL (same machine) instance, using both Win auth and Sql Auth, trying specify instance name on gui, or also adding a 'Client Network Alias', but I always get the message 'Failed to retrieve data for this request.'.
What I'm doing wrong? I can't understand.
TIA
Luigi

Martin
2008-05-09
re: SQL Server 2005: TableDiff.exe GUI
Mladen
This is a fantastic little tool thanks.
I only wish it could compare SQL against microsoft access as well it would save me a whole load of hassle.
Thanks again
Martin

sonny
2008-05-22
re: SQL Server 2005: TableDiff.exe GUI
It is really helpful utility... I winder if any one create SP to use this to insert the result into table and then script it so script can be run on the destination DB.... It will be very handy and useful to save valuable Time of DBA.

Thanks in Advance

Nick
2008-07-18
re: SQL Server 2005: TableDiff.exe GUI
Well played Sir, this is brilliant!

tracey
2008-09-12
re: SQL Server 2005: TableDiff.exe GUI
Is there a way to run it for all tables especially when the replication transactional from publisher to subscriber is not in sync.
So i can then just run this to update the subscription tables with the necessary data.

Scott B
2008-10-16
re: SQL Server 2005: TableDiff.exe GUI
great tool... will this tool detect if data has changed between two database table that use different collation? we are converting a database from one latin collation to the the sql server default latin collation and i want ot ensure no data is different in the destination...

I am not looking for help doing the collation, we have that covered, just wondering if this tool/tablediif can do the data integrety checks.

Mladen
2008-10-16
re: SQL Server 2005: TableDiff.exe GUI
no clue. never tried that. try it on a test table and see :))

Scott B
2008-10-16
re: SQL Server 2005: TableDiff.exe GUI
yep thats the plan. just wondering if you had seen it used in that manor before. Thanks

Renato Marroquin
2008-10-21
re: SQL Server 2005: TableDiff.exe GUI
Hi, just a quick question here, this tool only compares tables between tables from sql 2k5 right? it can't compare between tables from previous versions of sql server to 2k5 right? Thanks.

Mladen
2008-10-21
re: SQL Server 2005: TableDiff.exe GUI
as far as i know i works on 2000 too. haven't tried it though.

Chris O'Donnell
2008-11-07
re: SQL Server 2005: TableDiff.exe GUI
This an excellent tool!

Could I suggest some enhancements?

1. A facility to select views aswell as tables. Our replication works by replicating to source tables that have an additional column (identifying the publisher), so a direct comparison of Source Table to Destination Table is not possible, but I can compare a Source View (that includes the additional column) with the Destination Table. If the GUI could do that then it would allow us to use it.

2. A facility to compare multiple views/tables.

Thanks.

Mladen
2008-11-07
re: SQL Server 2005: TableDiff.exe GUI
hi,
i've stopped development of this a long while ago... if you want i can send you the source and you can change it by yourself.

BeeradG
2008-11-12
re: SQL Server 2005: TableDiff.exe GUI
Thanks a bunch!

Jignesh
2008-11-14
re: SQL Server 2005: TableDiff.exe GUI
Hi Mladen,

Thanks for such handy tool.

I have some similar requirements but I cannot use this tool as it is. I need to customize this tool to fit my requirements. Would it be possible for you to share source code for this tool?

Thanks,
Jignesh


Dominik
2008-11-21
re: SQL Server 2005: TableDiff.exe GUI
Great tool! Thx!

Kevin Bailey
2008-11-28
re: SQL Server 2005: TableDiff.exe GUI
Very nice tool! Thanks for sharing.

Polly Anna
2009-02-11
re: SQL Server 2005: TableDiff.exe GUI
Brilliant program. Thank you very much for making it available to all of us.

Kind regards,

Polly Anna

zam
2009-02-15
re: SQL Server 2005: TableDiff.exe GUI
good program, tq so much

Keith Lunevich
2009-03-02
re: SQL Server 2005: TableDiff.exe GUI
Is there are way with the tablediff.exe or your tablediffgui.exe utilities that the insert/update/delete statements can be sent directly to a specified database table rather than the text file?

Thanks.

Mladen
2009-03-02
re: SQL Server 2005: TableDiff.exe GUI
don't think so.

Jaime
2009-04-29
re: SQL Server 2005: TableDiff.exe GUI
Thanks for sharing this helpful tool!
Great work by the way...

Oran
2009-05-11
re: SQL Server 2005: TableDiff.exe GUI
Great Tool!

This doesn't seem to work for SQL Server 2008.
Is that Correct?

Mladen
2009-05-12
re: SQL Server 2005: TableDiff.exe GUI
i have no idea since i haven't really tried. but if the tablediff utility has changed then it won't work oherwise i don't know why it shouldn't.

Jack Shaftoe
2009-05-15
re: SQL Server 2005: TableDiff.exe GUI
Where does it send the Output "TableName" if you are comparing across 2 DB's?

sql proggrammer
2009-07-09
re: SQL Server 2005: TableDiff.exe GUI
this is gr8! thank you so much for sharing it!

Jude Pieries
2009-07-16
re: SQL Server 2005: TableDiff.exe GUI
Excellent, thank you for sharing this with everyone

Peter
2009-07-31
re: SQL Server 2005: TableDiff.exe GUI
Thanks for a very handy tool - saved a heap of time syncing dbs.
One point - would it be possible to enlarge the Table Combo Boxes as many of the longer tables names get truncated and I can't tell if i've selected the right one.
Hopefully only a minor changes to the UI.
Thanks
Peter
ps. it does work with 2005 and 2008 as I am syncing from 2008 live back to 2005 dev - go figure, but it works great!

Matteo
2009-08-13
re: SQL Server 2005: TableDiff.exe GUI
Thanks!!!!! :-)

Excellent work!
Matteo
ps. i have try only with 2 different "sql server 2005" server.

csm
2009-08-13
re: SQL Server 2005: TableDiff.exe GUI
Very useful tool, but doesn't works. Got the message "Failed to retrieve data for this request", trying with IP, name and alias of the server... :(

Krishnaraj
2009-10-14
re: SQL Server 2005: TableDiff.exe GUI
Excellent work....Thanks a lot for the explanatuion in the earlier post and making a GUI like this

Robert
2009-10-19
re: SQL Server 2005: TableDiff.exe GUI
When I clicked on the link above, my company's Web Security Gateway blocked it because it "contains malicious code." I then right-clicked on the link and was able to save the zip file to my machine, but WinZip gives me the following error when I try to open it:

Cannot open file: it does not appear to be a valid archive.

Any idea what could be wrong here? Thanks.

Mladen
2009-10-19
re: SQL Server 2005: TableDiff.exe GUI
i have no lcue what could be the problem. i can download and extract it without problem.

ILIA
2009-11-18
re: SQL Server 2005: TableDiff.exe GUI
Same problem as several other people here.
Can't connect to server even though the credentials are correct.
I am on SQL 7. I do have the tableDiff.exe though.
This sounds like a very useful tool if it worked.
Since you offered to send the code, can you send it to me please?
or a fixed version?
Anybody?
Thanks for sharing the fruit of your labor.

Hari
2009-12-22
re: SQL Server 2005: TableDiff.exe GUI
Nice little tool. It helps a lot to save time..

RamLal
2010-02-01
re: SQL Server 2005: TableDiff.exe GUI
First comment in 2010 !! Cool Work !!!!

Kevin
2010-04-01
re: SQL Server 2005: TableDiff.exe GUI
This is a very useful tool. However, as a few before me, I would like to make a few changes for my own purposes. I notice you've kindly sent the source to other developers. Any chance you could send it to me. Thanks.

Vlad
2010-05-28
re: SQL Server 2005: TableDiff.exe GUI
Hello, and thanks for the tool.

It fails to connect to SQL Server 2008 saying just "Failed to connect to server". My guess is, the tool uses SMO 9.0 that doesn't support SQL Server 2008.
Could you please recompile the tool against SMO for SQL Server 2008?

Noël
2010-05-31
re: SQL Server 2005: TableDiff.exe GUI
Hi Mladen,

I just discovered your tool and it's been really useful for me in order to fullfill my work over a clustered sql2005 enviroments.
I would really apreciate if you can share the source code with me to add some improvements based on customers requeriments.

Thanks for sharing!
Noël (Barcelona, Spain)

Deepika
2010-07-09
re: SQL Server 2005: TableDiff.exe GUI
Hi,
Thanks for the tool. But it fails for SQL server 2008. Can you put a SQL 2008 version?

Thanks in advance,
Deepika

Wayne Bloss
2010-07-16
re: SQL Server 2005: TableDiff.exe GUI
I created a UI similar to this that does bulk processing using tablediff.exe.

You can find the source code and binary release here - http://code.google.com/p/sqltablediff/

nightvision
2010-07-29
re: SQL Server 2005: TableDiff.exe GUI
I tried it on a WinXP comparing a SQL2008 as the source and SQL2005 as the destination and i was able to compare find.

I have a problem running the applicatio on a Win7. The application doesn't load the SQL servers on the dropdowns and if you type them in, it still fails to connect.

Is the GUI not compatible with WIN7 running SQL2008?