Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
EnumJobStepLogs Method (Int32)
Collapse the table of content
Expand the table of content

Job.EnumJobStepLogs Method (Int32)

Enumerates a list of job step log files for the job step with the specified ID value.

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

member EnumJobStepLogs : 
        stepId:int -> DataTable 

Parameters

stepId
Type: System.Int32
A Int32 value that specifies the job step ID value.

Return Value

Type: System.Data.DataTable
A DataTable object value that contains an enumerated list of all the job step log files for the job step with the specified ID value.

The following code example creates a job then displays the job step log files for the specified job step ID.

C#

Server srv = new Server("(local)");
Job jb = srv.JobServer.Jobs["Test Job"];
DataTable stepLogs = jb.EnumStepLogs(1);

PowerShell

$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")
$jb = $srv.JobServer.Jobs["Test Job"]
$stepLogs = $jb.EnumStepLogs(1)

Community Additions

ADD
Show:
© 2015 Microsoft