Identify DML changes between two databases?

  • I've existing DB called A which contains 410 tables. I created another DB called B from the backup of A and modified the database B such as creating some new table and modifying existing tables and drop of some tables and so on. Now B database contains 548 tables.By the meantime A database as well undergone some changes. Say for example, in database A, in tableA some rows has been inserted. In database B, in tableA some rows has been deleted/modified.

    I would like to know the data changes between the two databases.

    My objective is that in order to sync the Database A with Database B I need to create some scripts. To identify the schema changes I've tool. No issue at that point. But I worry about DML changes. How to create DML scripts such as Insert, update, delete queries which make my Database A sync with Database B. How to achieve this?

    Please do guide me.

    Note: I'm using SQL SERVER 2008 R2.

    Please note that I've downloaded the Red Gate's data compare tool which shows the difference but did not provide the script to sync it.

  • Easwaran-336667 (1/31/2013)


    Please note that I've downloaded the Red Gate's data compare tool which shows the difference but did not provide the script to sync it.

    redgate SQL Data Compare will most certainly generate scripts. Are you saying the trial version will not generate a script? If not, and you need that functionality, why not buy it?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • You can use the MERGE statement for the data since you're using 2008 R2. It will take quite some time to script this all out. More Info: MSDN: MERGE

    With 500+ tables I certainly recommend buying SQL Data Compare and knock this task out with a few clicks.

Viewing 3 posts - 1 through 2 (of 2 total)

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