Export (0) Print
Expand All

Job.EnumJobStepLogs Method (String)

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

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

public DataTable EnumJobStepLogs(
	string stepName
)

Parameters

stepName
Type: System.String
A String value that specifies the name of the job step.

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 name.

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

C#

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

PowerShell

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

Community Additions

ADD
Show:
© 2014 Microsoft