Skip to content

Latest commit

 

History

History
81 lines (55 loc) · 2.97 KB

sp-helptracertokens-transact-sql.md

File metadata and controls

81 lines (55 loc) · 2.97 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_helptracertokens (Transact-SQL)
sp_helptracertokens returns one row for each tracer token that was inserted into a publication to determine latency.
markingmyname
maghan
randolphwest
05/15/2024
sql
replication
reference
sp_helptracertokens
sp_helptracertokens_TSQL
sp_helptracertokens
TSQL

sp_helptracertokens (Transact-SQL)

[!INCLUDE SQL Server SQL MI]

Returns one row for each tracer token that was inserted into a publication to determine latency. This stored procedure is executed at the Publisher on the publication database or at the Distributor on the distribution database.

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

Syntax

sp_helptracertokens
    [ @publication = ] N'publication'
    [ , [ @publisher = ] N'publisher' ]
    [ , [ @publisher_db = ] N'publisher_db' ]
[ ; ]

Arguments

[ @publication = ] N'publication'

The name of the publication in which tracer tokens were inserted. @publication is sysname, with no default.

[ @publisher = ] N'publisher'

The name of the Publisher. @publisher is sysname, with a default of NULL.

@publisher should only be specified for non-[!INCLUDE ssNoVersion] Publishers.

[ @publisher_db = ] N'publisher_db'

The name of the publication database. @publisher_db is sysname, with a default of NULL. @publisher_db is ignored if the stored procedure is executed at the Publisher.

Result set

Column name Data type Description
tracer_id int Identifies a tracer token record.
publisher_commit datetime The date and time that the token record was committed at the Publisher in the publication database.

Return code values

0 (success) or 1 (failure).

Remarks

sp_helptracertokens is used in transactional replication.

sp_helptracertokens is used to obtain tracer token IDs when executing sp_helptracertokenhistory.

Examples

:::code language="sql" source="../replication/codesnippet/tsql/sp-helptracertokens-tran_1.sql":::

Permissions

Only members of the sysadmin fixed server role, the db_owner fixed database role in the publication database, or db_owner fixed database or replmonitor roles in the distribution database can execute sp_helptracertokenhistory.

Related content