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?