SQLTeam.com | Weblogs | Forums

Comparison for 75 tables in two different SQL Server databases

I'm trying to do a column by column, row by row comparison for 75 tables in two different databases. The tables contain up to 165 million records.

I need to determine if there are any missing records, and we need to identify any columns that contain different values. Potential problems include decimal errors.

Thanks for any assistance or advice.

Look at the INTERSECT and EXCEPT operators.

you MIGHT have to break it up into a lot lot lot of TINY chunks

I would start with rowcounts. At least it gives you an idea of missing records. I know the counts could match but the data would be different, but it's a start. Maybe create some sums on columns to verify