Learn more about SQL Server tools

 
 

Tutorials          DBA          Dev          BI          Career          Categories          Events          Whitepapers          Today's Tip          Join

Tutorials      DBA      Dev      BI      Categories      Events

DBA    Dev    BI    Categories

 

SQL Server Comparison Tools


By:   |   Read Comments (5)   |   Related Tips: More > DBA Best Practices

Problem

There is often the need to compare both data and database structures from two databases either on the same server or on different servers.  Most text editors have a built-in process to allow you to do a diff and identify any differences between the two files, but comparing data is not quite that easy.  Using this diff process is great if you only want to compare a few files, but what if you need to scan your entire database to look for differences?

As with anything you can always create your own application to automate the comparison process.  You could cursor through all of the tables read the T-SQL from one server, get the T-SQL for the same object from the other server and do a comparison.   To compare the data you can write scripts that read row by row and do a comparison of the data.  But why bother when there are so many products out there already.

Solution

Luckily a lot of products already exist.  These products allow you to compare database objects, data, DTS scripts, servers, etc...  In addition, these products are not all that expensive either.  Some of the products are under $100 US and I also found a company that offers a free version, see below.

 Following is a list of the various products that allow you to do comparisons:

Object Comparison:

Data Comparison

DTS Comparison

Server Comparison

Free Tools

As far as I can tell this is a complete list, but if there are other products out there send an email to tips@mssqltips.com and we will update this list.

Next Steps
  • Next time you need to compare your database objects don't waste your time doing it manually.  Purchase one of these products or download the free version and give it a try.  Most if not all of these vendors offer free trial versions.
  • Determine what needs to be compared and how frequently.  Look at the different options that allow you to compare objects, data, dts packages and even servers.
  • We provided the list of products, so take this list and find the product that is right for you.

Updated: 12/17/2010



Last Update:





About the author
MSSQLTips author Greg Robidoux Greg Robidoux is the President of Edgewood Solutions and a co-founder of MSSQLTips.com.

View all my tips
Related Resources





More SQL Server Solutions




Post a comment or let the author know this tip helped you.

All comments are reviewed, so stay on subject or we may delete your comment.

*Name    *Email    Notify for updates 

Note: your email address is not published. Required fields are marked with an asterisk (*)


Get free SQL tips:

*Enter Code refresh code     



Tuesday, August 20, 2013 - 5:03:02 PM - Greg Robidoux Back To Top

@Binu - have you talked to ApexSQL to see if they have a solution to automate what you are doing with their tool?


Thursday, August 15, 2013 - 12:31:52 PM - Binu Back To Top

Hi,

I have got a new task for migrating SQL objects from VSS to TFS.

Some objects are there in both VSS and TFS.

Have to compare the objects in both VSS and TFS and find out the differences.

Could you please suggest a way for doing this.

For now, we are scripting out objects from VFS and with the help of APEXDiff tool we are manually comparing every single object with object in TFS.How to automate this?

Thanks in advance.

--Binu

 

 

 

 


Wednesday, May 22, 2013 - 8:50:27 AM - SergeiK Back To Top

Sorry for the mistake in URL...

Devart's SQL Schema Compare is available here: http://www.devart.com/dbforge/sql/schemacompare/


Wednesday, May 22, 2013 - 8:42:27 AM - SergeiK Back To Top

I wonder why Devart's products are not mentioned here. I'm sure they must be observed here. Try dbForge Data and Schema Compare tools – the most professional sql comparison tools I've ever used!

SQL Data Compare: http://www.devart.com/dbforge/sql/datacompare/

SQL Schema Compare: http://www.devart.com/dbforge/mysql/schemacompare/

The price is low but the quality is great!

p.s. Free trials are available!


Tuesday, November 20, 2012 - 10:18:40 AM - VC Back To Top

Hi Greg,

 I prefer this one as it can accomodate  

Ref-  http://www.codeproject.com/Articles/205011/SQL-Server-Database-Comparison-Tool 

Cheers,

VC


Learn more about SQL Server tools