Groups | Blog | Home
all groups > sql server dts > july 2006 >

sql server dts : Compare row counts


George
7/7/2006 8:58:01 AM
Hello all!

I am changing the collation on the database and doing a DTS package to copy
all of the tables from one database to another. Can someone help with the
script that can then (once DTS is done) compare row counts between the new
and old database? Maybe just show the diferent tables or at least have that
option, otherwise I would need the full database to database comparison with
table name and the row count. We have 5000 tables and manual comparison is
not practical at this time as we are at the time crunch.

Allan Mitchell
7/8/2006 8:58:34 PM
Hello George,

Are you asking how to do this in DTS or in general?

DTS has nothing built in and I do not think this is really the job for it
either. I would be tempted to use something like Red-Gate's Data Compare
or I would write a script to go against all tables in both databases that
counted the rows and inserted them into a table. I would then compare tables
with the same names that have different servers.


Allan

[quoted text, click to view]

George
7/10/2006 5:59:02 AM
Sure. I agree. I would like to have that script as I need to make sure that
no tables are diferent. Do you have that kind of the script?

[quoted text, click to view]
AddThis Social Bookmark Button