Link to home
Create AccountLog in
Avatar of BrookK
BrookK

asked on

Row count in a table

Hello All,

I have to check replication between Publishers and subscribers.

SO I need to get the counts on all the published articles from source and destination servers.
However, instead of running individual count(*) statements for each table on both the servers, I wanted to see if there can be a query which can insert the results from count(*) in a table for all the articles.

Table      Source              Count        Destination   Count
Tbl1         server1:Pub    1000          server2.Sub  908
Tbl2         server1:Pub    29              server2.Sub  29
....
....

I need advice on how to write a query to achieve this result set.
Thanks,
-B
ASKER CERTIFIED SOLUTION
Avatar of RGBDart
RGBDart
Flag of Russian Federation image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of lcohan
If using or planning to use SQL Replication I suggest you get familiar and use following SQL internal stored procedures:

"How to: Programmatically Monitor Replication"
http://msdn.microsoft.com/en-us/library/ms147874.aspx
Avatar of BrookK
BrookK

ASKER

Worked little change