| title | sp_helptracertokens (Transact-SQL) | Microsoft Docs | ||
|---|---|---|---|
| ms.custom | |||
| ms.date | 03/14/2017 | ||
| ms.prod | sql | ||
| ms.prod_service | database-engine | ||
| ms.reviewer | |||
| ms.technology | replication | ||
| ms.topic | language-reference | ||
| f1_keywords |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | 61f27234-531d-4b37-8fa3-fe4c32e6f521 | ||
| author | stevestein | ||
| ms.author | sstein |
[!INCLUDEappliesto-ss-asdbmi-xxxx-xxx-md]
Returns one row for each tracer token that has been 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.
Transact-SQL Syntax Conventions
sp_helptracertokens [ @publication = ] 'publication'
[ , [ @publisher = ] 'publisher' ]
[ , [ @publisher_db = ] 'publisher_db' ]
[ @publication = ] 'publication'
Is the name of the publication in which tracer tokens were inserted. publication is sysname, with no default.
[ @publisher = ] 'publisher'
The name of the Publisher. publisher is sysname, with a default of NULL.
Note
This parameter should only be specified for non- [!INCLUDEmsCoName][!INCLUDEssNoVersion] Publishers.
[ @publisher_db = ] 'publisher_db'
The name of the publication database. publisher_db is sysname, with a default value of NULL. This parameter is ignored if the stored procedure is executed at the Publisher.
| 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. |
0 (success) or 1 (failure)
sp_helptracertokens is used in transactional replication.
sp_helptracertokens is used to obtain tracer token IDs when executing sp_helptracertokenhistory (Transact-SQL).
[!code-sqlHowTo#sp_tracertokens]
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.
Measure Latency and Validate Connections for Transactional Replication
sp_deletetracertokenhistory (Transact-SQL)