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