1

Topic: Statistics of replicable commands

Good afternoon;
I need to receive statistics on commands which sit at present in basis Distribution in a following type:
"A database name","a table Name","command Type (INSERT, DELETE, UPDATE), the Amount.
How it is better to make?
I tried to launch sp_browsereplcommands with an output of results in the temporary table that then this data  in the necessary type, but it turns out very long.
There are other variants?
Thanks.

2

Re: Statistics of replicable commands

The commands concerning the specific publication in a DB:

use distribution;
declare @publisher_db sysname = N '... ', @publication sysname = N '... ';
select
d.publisher_db, p.publication, a.article, cast (c.command as nvarchar (4000)), c.*
from
dbo. MSpublisher_databases d join
dbo. MSrepl_commands c on c.publisher_database_id = d.id join
dbo. MSarticles an on a.publisher_db = d.publisher_db and a.publisher_id = d.publisher_id and a.article_id = c.article_id join
dbo. MSPublications p on p.publisher_id = d.publisher_id and p.publisher_db = d.publisher_db and p.publication_id = a.publication_id
where
d.publisher_db = @publisher_db and
p.publication = @publication and
c.command_id = 1;

To receive the result necessary to you - a trick.

3

Re: Statistics of replicable commands