Delen via


JobStep.DeleteLogs Method (DateTime)

Deletes job step log files that are older than the specified date.

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

Syntax

'Declaration
Public Sub DeleteLogs ( _
    olderThan As DateTime _
)
'Usage
Dim instance As JobStep
Dim olderThan As DateTime

instance.DeleteLogs(olderThan)
public void DeleteLogs(
    DateTime olderThan
)
public:
void DeleteLogs(
    DateTime olderThan
)
member DeleteLogs : 
        olderThan:DateTime -> unit 
public function DeleteLogs(
    olderThan : DateTime
)

Parameters

  • olderThan
    Type: System.DateTime
    A DateTime system object value that specifies the date. Log files that have an earlier date are deleted.

Remarks

This method was introduced in SQL Server 2005.