PurgeJobHistory Method

Cette fonctionnalité sera supprimée dans une prochaine version de Microsoft SQL Server. Évitez d'utiliser cette fonctionnalité dans de nouveaux travaux de développement, et prévoyez de modifier les applications qui utilisent actuellement cette fonctionnalité.

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

Syntaxe

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);

Notes

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

Applies To:

JobServer Object