I enabled change tracking in my database Trans and table Employee
ALTER DATABASE [Trans]
SET CHANGE_TRACKING = ON
( CHANGE_RETENTION = 5 MINUTES , AUTO_CLEANUP = ON)
ALTER TABLE [Employee]
ENABLE CHANGE_TRACKING
WITH ( TRACK_COLUMNS_UPDATED = OFF )
I did some update in my employee tables then check data in change tracking
SELECT * FROM CHANGETABLE(CHANGES [Employee], 0) AS ETbl
It show data which has changed. I know that cleanup process is asynchronous so I waited for a bit longer than the retention period (lets say 8 Minutes). I still get the result with the query. Cleanup process is executing after 2 days.
I have searched online about it
Change Tracking Auto Cleanup doesn't work
but not found proper answer.