Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 2.63 KB

view-replicated-commands-and-information-in-distribution-database.md

File metadata and controls

37 lines (29 loc) · 2.63 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic ms.custom helpviewer_keywords dev_langs monikerRange
View replicated commands & information in Distribution database
Learn how to view replicated commands and other replication related information in the Distribution database for SQL Server.
MashaMSFT
mathoma
03/09/2017
sql
replication
how-to
updatefrequency5
sp_browsereplcmds
transactional replication, monitoring
distribution databases [SQL Server replication], viewing replicated commands
viewing replicated commands
TSQL
=azuresqldb-mi-current||>=sql-server-2016

View Replicated Commands and Information in Distribution Database

[!INCLUDEsql-asdbmi] When using transactional replication, transaction commands are stored in the distribution database until the Distribution Agent propagates them to all Subscribers or a Distribution Agent at the Subscriber pulls the changes. These pending commands in the distribution database can be viewed programmatically using replication stored procedures. For more information, see Replication Stored Procedures (Transact-SQL).

To view replicated commands from all transactional publications in the distribution database

  1. At the Distributor on the distribution database, execute sp_browsereplcmds.

To view replicated commands in the distribution database from a specific article or from a specific database published using transactional replication

  1. (Optional) At the Publisher on the publication database, execute sp_helparticle. Specify @publication and @article. Note the value of article id in the result set.

  2. At the Distributor on the distribution database, execute sp_browsereplcmds. (Optional) Specify the article ID from step 2 for @article_id. (Optional) Specify the ID of the publication database for @publisher_database_id, which can be obtained from the database_id column in the sys.databases catalog view.

See Also

Programmatically Monitor Replication