lundi 2 mars 2015

Change Tracking clenup


Is there a way to know when cleanup of change tracking tables occurs? How to check last occurrence of cleanup process?


BACKGROUND:


I have Change Tracking on database (retention = 1 minute):



ALTER DATABASE [test] SET CHANGE_TRACKING = ON (CHANGE_RETENTION = 1 MINUTES)


I do some updates in my test table and then wait a bit more than retention period (lets say 3 minutes). As the cleanup process is async, I do understand that there NO guaranty that CT tables will be cleaned up after 1 minute. It can happen any time that is > 1 min.


I found this proc to call cleanup process manually:



EXEC sp_flush_commit_table_on_demand 100000


But it does not work as expected.. (Change Tracking rows are still in place after retention period)





Aucun commentaire:

Enregistrer un commentaire