The PurgeJobHistory method removes system records maintaining execution history for all SQL Server Agent jobs, or those matching the filter criteria specified.
object.PurgeJobHistory( [ Filter ] )
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list. |
Filter | Optional. A JobHistoryFilter object constraining record removal to those records identified by the criteria set in the object. |
For more information about using the JobHistoryFilter object properties to identify job history records, see JobHistoryFilter Object.
HRESULT PurgeJobHistory(
LPSQLDMOJOBHISTORYFILTER pFilter = NULL);