Share via


JobServer.PurgeJobHistory Method (JobHistoryFilter)

Removes all logged records of SQL Server Agent jobs as specified by a filter.

Namespace:  Microsoft.SqlServer.Management.Smo.Agent
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public Sub PurgeJobHistory ( _
    filter As JobHistoryFilter _
)
'Usage
Dim instance As JobServer 
Dim filter As JobHistoryFilter

instance.PurgeJobHistory(filter)
public void PurgeJobHistory(
    JobHistoryFilter filter
)
public:
void PurgeJobHistory(
    JobHistoryFilter^ filter
)
member PurgeJobHistory : 
        filter:JobHistoryFilter -> unit
public function PurgeJobHistory(
    filter : JobHistoryFilter
)

Parameters

Examples

Scheduling Automatic Administrative Tasks in SQL Server Agent

See Also

Reference

JobServer Class

PurgeJobHistory Overload

Microsoft.SqlServer.Management.Smo.Agent Namespace

Other Resources

Automated Administration Tasks (SQL Server Agent)