Change data capture, or CDC, is a tool that detects records changes made to a database. Change Data Capture expose INSERTs, UPDATEs, and DELETEs applied to SQL Server tables. It Display Historical Records as well current Records.
- To Detects data changes on Table, First You should enable “Sql Server Agent ” .

- Enable Database for CDC

- Enable a Table for All and Net Changes Queries .

- cdc.captured_columns : By default, It Returns all columns of the source table are captured.

- cdc.change_tables : Returns one row for each change table in the database.

cdc.<capture_instance>_CT : The table returns one row for each insert and delete operation performed on the source table, And It displays data before updated and data after updated .

cdc.lsn_time_mapping : 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.

- To Disable Database for Change Data Capture .
-- Disable Database for Change Data Capture . Execute the Stored Procedure.
EXEC sys.sp_cdc_disable_db ;
Happy Query , Thanks…