Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compare all table records in 2 Databases
Message
 
 
À
11/10/2009 22:45:25
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01428886
Message ID:
01428887
Vues:
85
This message has been marked as the solution to the initial question of the thread.
>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.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform