SQL Script

  • Hi ,

    In advance Thanks for any help!

    I have a situtaion to compare data between two tables residing in two different databases. There are two databases (db1 & db2).

    db1 is completely relational with defined business rules. Typical production database.

    db2 is not relational,(I mean no relationship between the tables. All tables are just created individually thru DTS while loading the data from flat files).

    In both the databases data is coming from same source(Flat files) 

    In db1 - we are loading the data thru SSIS. (Data is loaded into multiple tables (db1 is completely relational)

    In db2 - we are loading the data manually thru DTS and we are creating each flat file as one table.

    Task is, we need to compare the data in record level between the tables residing in db1 & db2 databases by T-SQL scripts.

    If anyone has T-SQL script for this scenario, if you can share it or suggest any other advises or methods to accomplish this task will be greatly appreciated.

    Thank you again!

  • Have you tried Redgate SQL Data Compare tool

    is this you have record level comparision and many more features.


    Thanks ,

    Shekhar

  • you can also create binary checksums and compare the checksums to look for differences. Check BOL.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

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

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