Quantcast
Channel: SQL Server Express forum
Viewing all articles
Browse latest Browse all 3319

Change Tracking Auto Clean Up SQL Server

$
0
0

How do I know if the Auto Clean Up in Change Tracking in SQL Server worked?

my Database Change Tracking Properties:

Change Tracking: True

Retention Period: 1

Retention Period Units: Minutes

Auto Cleanup: True

I tried querying DML changes for the table using the ChangeTable Function. There are still records returned when I queried using the query below, even the retention period is 1 minute and no DML changes were made.

SQL Query used:

select tc.*,Maint_Hrs.* FROM CHANGETABLE(CHANGES [dbo].[Maint_Contract_Hrs_CDC], null) AS Maint_Hrs
join sys.dm_tran_commit_table tc on Maint_Hrs.sys_change_version = tc.commit_ts

My question then is, when auto cleanup automatically ran, should I still be seeing these records using the sql query? How do I know if the auto Cleanup worked successfully?


Viewing all articles
Browse latest Browse all 3319

Latest Images

Trending Articles



Latest Images

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