Tuesday, April 4, 2017

Replication Undistributed commands

SELECT DISTINCT
ma.article,
ma.publisher_db,
ms.subscriber_db,
ma.source_object,
ma.destination_object,
md.UndelivCmdsInDistDB AS 'Transactions to be processed',
md.DelivCmdsInDistDB AS 'Transactions processed'
FROM
distribution.dbo.MSarticles AS ma WITH (NOLOCK)
INNER JOIN
distribution.dbo.MSdistribution_status AS md WITH (NOLOCK)
ON ma.article_id = md.article_id
INNER JOIN
distribution.dbo.MSsubscriptions AS ms WITH (NOLOCK)
ON ma.article_id = ms.article_id AND md.article_id = ms.article_id
WHERE
(md.UndelivCmdsInDistDB > 0)
ORDER BY
ma.publisher_db, 'Transactions to be processed' DESC

No comments: