| title | sys.sp_flush_commit_table (Transact-SQL) | ||||
|---|---|---|---|---|---|
| description | Flushes the in memory syscommittab to disk to help with Change Tracking cleanup. | ||||
| author | JetterMcTedder | ||||
| ms.author | bspendolini | ||||
| ms.reviewer | randolphwest | ||||
| ms.date | 06/23/2025 | ||||
| ms.service | sql | ||||
| ms.subservice | system-objects | ||||
| ms.topic | reference | ||||
| f1_keywords |
|
||||
| helpviewer_keywords |
|
||||
| dev_langs |
|
[!INCLUDE SQL Server]
Flushes the in memory syscommittab to disk to help with change tracking cleanup.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
sp_flush_commit_table
[ @flush_ts = ] flush_ts
[ , [ @cleanup_version = ] cleanup_version ]
[ ; ]
Specifies the current change tracking version. @flush_ts is bigint, and can't be NULL.
The watermark change tracking version for syscommittab cleanup. @cleanup_version is bigint, with a default of NULL.
0 (success) or 1 (failure).
EXECUTE sys.sp_flush_commit_table 11;
GO[!INCLUDE ssresult-md]
Started executing query at Line 1
(10 rows affected)
Total execution time: 00:00:00.076
This procedure must be run in a database that has change tracking enabled.
Only a member of the sysadmin server role or db_owner database role can execute this procedure.