Sign in with Microsoft
Sign in or create an account.
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.


After you apply SQL Server 2016 Service Pack 3 (SP3) or SQL Server 2017 Cumulative Update 26 (CU26), and you run a change tracking cleanup stored procedure, sp_flush_commit_table_on_demand or sp_flush_CT_internal_table_on_demand, or if change tracking auto cleanup runs, you receive the following error message:

Msg 8114, Level 16, State 1, Procedure sp_add_ct_history, Line LineNumber

Error converting data type numeric to int.

Additionally, the following errors might be logged in the SQL Server error log:

DateTime spidNum     Error: 22122, Severity: 16, State: 1.

DateTime spidNum     Change Tracking autocleanup failed on side table of "table_name". If the failure persists, use sp_flush_CT_internal_table_on_demand to clean up expired records from its side table.

After you encounter this error, change tracking automatic cleanup can't clean up entries from the side table or syscommittab table.


SQL Server 2016 SP3 and SQL Server 2017 CU26 introduced a new table, dbo.MSchange_tracking_history, and a new stored procedure, sys.sp_add_ct_history, to record the history of change tracking cleanup. This table has a column, cleanup_version, that's currently declared as INT datatype. The sys.sp_add_ct_history stored procedure has a parameter, @cleanup_version, that's also declared as INT. On a busy system that uses change tracking, the cleanup version can cross a range of INT in a given interval. Then, when the change tracking cleanup runs, it will try to insert a BIGINT value into the INT column of this table. This generates the error that's described in the "Symptoms" section.


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

Cumulative Update 27 for SQL Server 2017

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:

Latest cumulative update for SQL Server 2017

On-demand hotfix information:

This problem is fixed in the following on-demand hotfix for SQL Server:


If you encounter this problem, revert to the previous build by uninstalling SQL Server 2016 SP3 or SQL Server 2017 CU26. Microsoft is actively investigating this problem, and will update this article with more information and additional guidance when that information is available.


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.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?

Thank you for your feedback!