title | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | dev_langs | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sp_replqueuemonitor (Transact-SQL) |
sp_replqueuemonitor lists the queue messages from a queue in SQL Server or Microsoft Message Queue. |
markingmyname |
maghan |
randolphwest |
08/22/2024 |
sql |
replication |
reference |
|
|
|
[!INCLUDE SQL Server SQL MI]
Lists the queue messages from a [!INCLUDE ssNoVersion] queue or [!INCLUDE msCoName] Message Queuing for queued updating subscriptions to a specified publication. If [!INCLUDE ssNoVersion] queues are used, this stored procedure is executed at the Subscriber on the subscription database. If Message Queuing is used, this stored procedure is executed at the Distributor on the distribution database.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
sp_replqueuemonitor
[ [ @publisher = ] N'publisher' ]
[ , [ @publisherdb = ] N'publisherdb' ]
[ , [ @publication = ] N'publication' ]
[ , [ @tranid = ] N'tranid' ]
[ , [ @queuetype = ] queuetype ]
[ ; ]
The name of the Publisher. @publisher is sysname, with a default of NULL
. The server must be configured for publishing. NULL
is used to get all Publishers.
The name of the publication database. @publisherdb is sysname, with a default of NULL
. NULL
is used to get all publication databases.
The name of the publication. @publication is sysname, with a default of NULL
. NULL
is used to get all publications.
The transaction ID. @tranid is sysname, with a default of NULL
. NULL
is used to get all transactions.
The type of queue that stores transactions. @queuetype is tinyint, and can be one of these values.
Value | Description |
---|---|
0 (default) |
All types of queues |
1 |
Message Queuing |
2 |
[!INCLUDE ssNoVersion] queue |
0
(success) or 1
(failure).
sp_replqueuemonitor
is used in snapshot replication or transactional replication with queued updating subscriptions. The queue messages that don't contain SQL commands or are part of a spanning SQL command aren't displayed.
Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_replqueuemonitor
.