Syntaxsp_flush_CT_internal_table_on_demand [ @TableToClean= ] 'TableName'
Arguments[@TableToClean= ] 'TableName' is the name of the table, for which change tracking is enabled. The backlogs are left for the automatic cleanup by change tracking.
Expected outputWhen you run the stored procedure, one of the following scenarios happens:
- If the table doesn't exist or if change tracking isn't enabled, appropriate error messages will be thrown.
- This stored procedure will call another internal stored procedure that cleans up contents from the change tracking side table that's based on the invalid cleanup version by using the sys.change_tracking_tables dynamic management view. When it's running, it will show the information of total rows deleted (for every 5000 rows).