HistoryRetention Property

后续版本的 Microsoft SQL Server 将删除该功能。请避免在新的开发工作中使用该功能,并着手修改当前还在使用该功能的应用程序。

The HistoryRetention property specifies the number of hours to maintain replication distribution history data.

语法

object
.HistoryRetention [=value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list.
  • value
    A positive long integer. The default is 48 hours.

Data Type

Long

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetHistoryRetention(LPDWORD pRetVal);
HRESULT SetHistoryRetention(DWORD NewValue);

备注

Installing replication creates a SQL Server Agent job responsible for cleaning the replication history tables. Rows in the tables older than the current hour minus the retention period are targets of the cleaning.

Applies To:

DistributionDatabase Object