Mike Levan
SSChampion
Points: 14201
More actions
February 17, 2009 at 9:19 am
#134824
how can i compare 2 similar db's residing on 2 different servers.
I need to check count in each tables thats it.
February 17, 2009 at 2:13 pm
#945503
I am using this query to do the job.
SELECT [TableName] = so.name, [RowCount] = MAX(si.rows)FROM sysobjects so, sysindexes siWHERE so.xtype = 'U' AND si.id = OBJECT_ID(so.name)GROUP BY so.nameORDER BY 2 DESC
SELECT
[TableName] = so.name,
[RowCount] = MAX(si.rows)
FROM
sysobjects so,
sysindexes si
WHERE
so.xtype = 'U'
AND
si.id = OBJECT_ID(so.name)
GROUP BY
so.name
ORDER BY
2 DESC
Grant Fritchey
SSC Guru
Points: 398909
February 18, 2009 at 7:12 am
#945892
Or you could spend a trivial amount of cash & pick up Red Gate's SQL Compare. It's a fantastic tool.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"- Theodore Roosevelt
Author of:SQL Server Execution PlansSQL Server Query Performance Tuning
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply