Skip to content

Latest commit

 

History

History
82 lines (60 loc) · 2.42 KB

sys-sp-flush-commit-table-transact-sql.md

File metadata and controls

82 lines (60 loc) · 2.42 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sys.sp_flush_commit_table (Transact-SQL)
Flushes the in memory syscommittab to disk to help with Change Tracking cleanup.
JetterMcTedder
bspendolini
randolphwest
08/21/2024
sql
system-objects
reference
sp_flush_commit_table
sp_flush_commit_table_TSQL
sys.sp_flush_commit_table
sys.sp_flush_commit_table_TSQL
sys.sp_flush_commit_tables
sp_flush_commit_tables
TSQL

sys.sp_flush_commit_table (Transact-SQL)

[!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

Syntax

sp_flush_commit_table
    [ @flush_ts = ] flush_ts
    [ , [ @cleanup_version = ] cleanup_version ]
[ ; ]

Arguments

[ @flush_ts = ] flush_ts

Specifies the current change tracking version. @flush_ts is bigint, and can't be NULL.

[ @cleanup_version = ] cleanup_version

The watermark change tracking version for syscommittab cleanup. @cleanup_version is bigint, with a default of NULL.

Return code values

0 (success) or 1 (failure).

Examples

EXEC 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

Remarks

This procedure must be run in a database that has change tracking enabled.

Permissions

Only a member of the sysadmin server role or db_owner database role can execute this procedure.

Related content