sys.sp_flush_commit_table (Transact-SQL)

Applies to: SQL Server

Flushes the in memory syscommittab to disk to help with change tracking cleanup.

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

Here is the result set.

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.