How to Compare Two Databases Table Structures and Data

  • In SQL 2008 I have two databases each with over 2,000 tables that are supplied by a 3rd party.

    I am looking for some scripts or a tool (preferably free) for comparing the table structures and the data of tables based on the same table name.

    Does anybody have any recommendations as the tools I have seen do either structure or data checks?

  • Not free, but Redgate (owners of this site) have data and structure comparison tools for SQL Server. Click the "a community service from redgate" bit in the upper-right corner of the page, look for SQL Compare and SQL Data Compare.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • marks_262 (7/5/2012)


    In SQL 2008 I have two databases each with over 2,000 tables that are supplied by a 3rd party.

    I am looking for some scripts or a tool (preferably free) for comparing the table structures and the data of tables based on the same table name.

    Does anybody have any recommendations as the tools I have seen do either structure or data checks?

    Use the TableDiff SQL Server utility, it's detailed in Books Online, this should give you what you need

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • If you happen to have Visual Studio 2010 (Premium or Ultimate editions), there is a Schema Compare and a Data Compare option in the Data menu.

  • Redgate is the best tool I used for database schema and data comparison.

    Although it is not free but you can use a 30days trial to see if it is fit for your purpose or not.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply