user13444194
user13444194

Reputation:

In CHANGE DATA CAPTURE (CDC) how can capture timestamp

In CDC technique how can we load data for time is inserted, deleted, updated. Is there any way we can capture these from CDC tables into data warehouse table?

Upvotes: 0

Views: 1865

Answers (1)

Greg Low
Greg Low

Reputation: 1586

Yes, one of the columns in the change tables is lsn. That's the log sequence number. You can map it to when it happened by using the function sys.fn_cdc_map_lsn_to_time:

https://learn.microsoft.com/en-us/sql/relational-databases/system-functions/sys-fn-cdc-map-lsn-to-time-transact-sql

Upvotes: 1

Related Questions