Skip to content

Latest commit

 

History

History
62 lines (47 loc) · 2.18 KB

sp-replcounters-transact-sql.md

File metadata and controls

62 lines (47 loc) · 2.18 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_replcounters (Transact-SQL)
sp_replcounters returns replication statistics about latency, throughput, and transaction count for each published database.
markingmyname
maghan
randolphwest
08/22/2024
sql
replication
reference
sp_replcounters
sp_replcounters_TSQL
sp_replcounters
TSQL

sp_replcounters (Transact-SQL)

[!INCLUDE SQL Server SQL MI]

Returns replication statistics about latency, throughput, and transaction count for each published database. This stored procedure is executed at the Publisher on any database.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

sp_replcounters
[ ; ]

Arguments

None.

Result set

Column name Data type Description
Database sysname Name of the database.
Replicated transactions int Number of transactions in the log awaiting delivery to the distribution database.
Replication rate trans/sec float Average number of transactions per second delivered to the distribution database.
Replication latency float Average time, in seconds, that transactions were in the log before being distributed.
Replbeginlsn binary(10) Log sequence number (LSN) of the current truncation point in the log.
Replnextlsn binary(10) LSN of the next commit record awaiting delivery to the distribution database.

Remarks

sp_replcounters is used in transactional replication.

Permissions

Requires membership in the db_owner fixed database role or sysadmin fixed server role.

Related content