Quantcast
Channel: SQL Server Replication forum
Viewing all articles
Browse latest Browse all 4054

Stuck!

$
0
0

Morning,

I have been stuck looking at an issue with Transactional Replication for the last couple of days. Each morning I come in to find a series of blocks with MSadd_replcmds (see attachment Replication1). If I open Replication Monitor first thing and look at the Publisher to Distribution History, the command count is hung (see attachment Replication2). The errors in this screenshot are me killing of the MSadd_replcmds spids. If I kill off these spids, the command count will briefly increase as it gets through more transactions, but then the blocks start again and the cycle repeats. I have tried looking at the data in the ms_replcmds table (below code snippet) and there are a few hundred thousand transactions from 4:00am still showing, not a clue where to start as far as digging through them to see if there is an obvious transactions causing it. If I resnapshot to push through the transactions, replication will continue fine until the overnight processing kicks in again. Rinse and repeat.

I am at a bit of a loss as to where to look next. There are no errors standing out, there are no transactions standing out.

Any guidance on what to look for next would be massively appreciated.

Cheers

SELECT 
	@@SERVERNAME
,	a.article
,	a.publisher_db
,	P.publication
,	min(entry_time) AS [Min]
,	max(entry_time) AS [Max]
,	count(*) AS [Cnt]
FROM 
	distribution.dbo.msrepl_transactions AS t
INNER JOIN distribution.dbo.msrepl_commands AS c 
	ON c.publisher_database_id = t.publisher_database_id AND c.xact_seqno = t.xact_seqno
INNER JOIN distribution.dbo.MSarticles AS a 
	ON a.article_id = c.article_id
INNER JOIN distribution.dbo.MSpublisher_databases AS d 
	ON d.publisher_db = a.publisher_db AND d.id = c.publisher_database_id  
INNER JOIN distribution.dbo.MSpublications AS P 
	ON P.publication_id = A.publication_id
WHERE 
	1 = 1
GROUP BY 
	a.article
,	a.publisher_db
,	P.publication
ORDER BY
	[Min];



Viewing all articles
Browse latest Browse all 4054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>