FIX: Change tracking manual cleanup fails with table non-existence error in SQL Server

Aplica-se a: SQL Server 2017 Developer on WindowsSQL Server 2017 Enterprise on WindowsSQL Server 2017 Enterprise Core on Windows


Consider the following scenario:

  • You create a schema and a table in the schema in Microsoft SQL Server.
  • You enable change tracking for that table.
  • You perform manual cleanup by using the sp_flush_CT_internal_table_on_demand command.

In this scenario, the cleanup may fail with an error that states that the table could not be found.

This error occurs because the sp_flush_CT_internal_table_on_demand command does not consider tables with different schemas, such as the tables that are not owned by dbo.


This issue is fixed in the following cumulative updates for SQL Server:

       Cumulative Update 1 for SQL Server 2017

       Cumulative Update 6 for SQL Server 2016 SP1

       Cumulative Update 8 for SQL Server 2014 SP2

Service pack information for SQL Server 2016

This update is fixed in the following service pack for SQL Server:

       Service Pack 2 for SQL Server 2016


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.


Learn about the terminology that Microsoft uses to describe software updates.