How to find which command has failed in SQL Server Replication?
To find out the list of replicated transaction, query the MSrepl_transactions
table in distribution
database. Copy the sequence number of the transaction (i.e., xact_seqno
) which entered the distribution database last.
Copy the xact_seqno from previous query and replace it in @xact_seqno_start
below.
Sample output:
You will be able to see the command that failed and debug further.
If you just want to see the error message or other queries that are useful to monitor and debug the replication issues, you can refer this blog post.