Skip to content

Latest commit

 

History

History
36 lines (30 loc) · 1.86 KB

cdc-lsn-time-mapping-transact-sql.md

File metadata and controls

36 lines (30 loc) · 1.86 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
cdc.lsn_time_mapping (Transact-SQL)
cdc.lsn_time_mapping (Transact-SQL)
VanMSFT
vanto
02/22/2023
sql
system-objects
reference
cdc.lsn_time_mapping
cdc.lsn_time_mapping_TSQL
cdc.lsn_time_mapping
TSQL

cdc.lsn_time_mapping (Transact-SQL)

[!INCLUDE SQL Server]

Returns one row for each transaction having rows in a change table. This table is used to map between log sequence number (LSN) commit values and the time the transaction committed. Entries may also be logged for which there are no change tables entries. This allows the table to record the completion of LSN processing in periods of low or no change activity.

We recommend that you don't query the system tables directly. Instead, execute the sys.fn_cdc_map_lsn_to_time (Transact-SQL) and sys.fn_cdc_map_time_to_lsn (Transact-SQL) system functions.

Column name Data type Description
start_lsn binary(10) LSN of the committed transaction.
tran_begin_time datetime Time that the transaction associated with the LSN began.
tran_end_time datetime Time that the transaction ended.
tran_id varbinary(10) ID of the transaction.

See Also

The Transaction Log (SQL Server)
cdc.<capture_instance>_CT (Transact-SQL)