Quantcast
Channel: Active questions tagged change-data-capture - Database Administrators Stack Exchange
Viewing all articles
Browse latest Browse all 132

Identify and delete specific data from Usertable_CT captured from a CDC enabled table

$
0
0

Scenario

We recently performed a heavy update operation updating two columns on a 2 tb user table. The User table is CDC enabled, which caused Usertable_CT table to bulk up. The User table is a heavy traffic table in production environment.

Current configuration of CDC allows data to be retained for 10 days. We don't want to wait for the CDC cleaning process until the data reaches the threshold

Question

a) Is there a way to identify these records in the _CT table, to help delete these records from the _CT table ?

My finding

cdc.lsn_time_mapping and Usertable_CT both have [start_lsn] which can be compared to capture the Transaction details (tran_begin_time, tran_end_time, tran_id, tran_begin_lsn) from cdc.lsn_time_mapping, could not find further links to discover User or session details which can uniquely identify the records

b) Is there a sql code that can help in avoiding capturing changes on a CDC enable User table for a particular operation instead of disabling and enabling CDC every time, In our case not capturing the update operation.

Will appreciate an answer to fix this problem and helping getting more knowledge and correct me on my findings

Thank you all for the time and efforts


Viewing all articles
Browse latest Browse all 132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>