Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compare all table records in 2 Databases
Message
From
11/10/2009 23:21:08
 
General information
Forum:
Microsoft SQL Server
Category:
Database management
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01428886
Message ID:
01428890
Views:
51
Hi,
thanks again.... for the undocumented command... ^.^


>>Is there a fast way or command to compare 2 database to have all the same record count in all the tables ?
>>
>>Thanks in advance.
>
>Look at using sp_MSForEachTable
>
>You can try running
>
>execute sp_MSForEachTable 'declare @Cnt int select @Cnt = count(*) from ?  print '' ?: '' + cast(@cnt as varchar(10)) '
>
>and then compare the output.
>
>Unfortunately, the tables are not in alphabetical order.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform