>>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.
Don't you think that it is an overkill for a simple job. I would simply use a T-SQL like this:
select object_name(si.id),si.rowcnt from [sys].[sysindexes] si
inner join [sys].[tables] st
ON si.id = st.[object_id]
where si.indid<2 and st.is_ms_shipped = 0
order by object_name(si.id)
Cetin