Category: Troubleshooting

Script to show Replication Topology

Share this PostChris Skorlinski, Microsoft SQL Server Escalation Services I came across this forgotten but very handy script from my friends Suhas and Gaurav to display your Replication topology. The output below is from SQL 2016 sample publications using AdventureWorksLT.   https://gallery.technet.microsoft.com/Display-Replication-b15e730c ============================================================= REPLICATION TOPOLOGY ============================================================= SELECT THE PUBLICATION-SUBSCRIPTION PAIR FOR SCOPING THE CASE =============================================================
Read More »

ReplTip – Foreign Key Check Constraints

Share this PostI recently worked with a customer seeing very slow transfer rate with Distribution Agent. Looking at RPC:Completed events we saw each sp_Msdel_ took .5 second generating over 200,000 reads. What, 200,000 reads to delete 1 row? Query plan should so small reads with 1 delete like shown below. StmtText -------- Clustered Index Delete(OBJECT:([AW2012_SUB].[SalesLT].[SalesOrderDetail].[PK_SalesOrderDetail_SalesOrderID_SalesOrderDetailID])
Read More »

ReplTip – Publishing 1 Article into 2 Publications bloats Distribution DB

Share this PostChris Skorlinski – Microsoft SQL Server Escalation Services While visiting a customer site, we discussed consequences of publishing common article\tables into multiple Publications. For this customer, each Publication contains same set of core or common tables used by all subscribers, but then some subscribers had tables unique to just that subscriber. For example,
Read More »

ReplTip – Distribution cleanup Job running but shows zero rows deleted

Share this Post  By Taiyeb Zakir, Microsoft SQL Escalation Services Consider the following scenario: Distribution cleanup Job is running and you see that number of rows in msrepl_commands and msrepl_transactions are reducing but the Cleanup Job history says 0 rows deleted: For example: Removed 0 replicated transactions consisting of 0 statements in 12961 seconds (0
Read More »