PurgeJobHistory Method (SQL-DMO)

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

Applies To

JobServer Object

Syntax

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.

Remarks

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

Prototype (C/C++)

HRESULT PurgeJobHistory(
LPSQLDMOJOBHISTORYFILTER pFilter = NULL);


(c) 1988-98 Microsoft Corporation. All Rights Reserved.