共用方式為


sys.sp_flush_commit_table (Transact-SQL)

適用於:SQL Server

將記憶體 syscommittab 中的 排清到磁碟,以協助進行變更追蹤清除。

Transact-SQL 語法慣例

語法

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

引數

[ @flush_ts = ] flush_ts

指定目前的變更追蹤版本。 @flush_ts是 bigint,而且不能是 NULL。

[ @cleanup_version = ] cleanup_version

清除的浮浮浮水印變更追蹤版本 syscommittab@cleanup_version為 bigint,預設值為 NULL

傳回碼值

0 (成功) 或 1 (失敗)。

範例

EXEC sys.sp_flush_commit_table 11;
GO

以下為結果集。

Started executing query at Line 1
(10 rows affected)
Total execution time: 00:00:00.076

備註

此程式必須在已啟用變更追蹤的資料庫中執行。

權限

只有系統管理員伺服器角色或db_owner資料庫角色的成員才能執行此程式。