共用方式為


PurgeJobHistory Method

未來的 Microsoft SQL Server 發行版本將不再提供此功能。請避免在新的開發工作中使用此功能,並計劃修改目前使用此功能的應用程式。

The PurgeJobHistory method removes system records maintaining execution history for all Microsoft SQL Server Agent jobs, or those matching the filter criteria specified.

語法

object
.PurgeJobHistory( [ Filter ] )

Parts

  • object
    Expression that evaluates to an object in the Applies To list.
  • Filter
    Optional. A JobHistoryFilter object that constrains record removal to those records identified by the criteria set in the object.

Prototype (C/C++)

HRESULT PurgeJobHistory(
LPSQLDMOJOBHISTORYFILTER pFilter = NULL);

備註

For more information about using the JobHistoryFilter object properties to identify job history records, see JobHistoryFilter Object.

Applies To:

JobServer Object