SQL Server 2008/2012: comparing tables data in two databases

Posted on 2014-07-14
Last Modified: 2014-07-25
Hi, we have two versions of the same database and want to be able to compare data in the tables from time to time to make sure the data is the same or to know the differences.

What do you think is the best way to implement this?

Question by:quasar_ee
    LVL 13

    Assisted Solution

    by:Russell Fox
    You'll either need to code a custom solution or get a 3rd party product like Open DBDiff or Redgate's SQL Compare.
    LVL 14

    Expert Comment

    by:Vikas Garg

    For your case I think Replication will be best suited which can be unidirectional or bidirectional so that you can synchronize your tables for two different databases.
    LVL 68

    Accepted Solution

    MS provides a free command-line tool, "tablediff.exe".  Like bcp and/or format files, it's somewhat tricky to get working the first time, but it's pretty good overall considering that it's free :-) .  I believe at least one vendor even offers "older"/"baby" version of its compare too free, but that's just from memory, and I don't recall the details.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Introduction In my previous article ( I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
    Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
    This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
    Via a live example, show how to setup several different housekeeping processes for a SQL Server.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now