EnumJobStepLogs 方法 (String)
Enumerates a list of job step log files for the job step with the specified name.
命名空間: Microsoft.SqlServer.Management.Smo.Agent
組件: Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)
語法
'宣告
Public Function EnumJobStepLogs ( _
stepName As String _
) As DataTable
'用途
Dim instance As Job
Dim stepName As String
Dim returnValue As DataTable
returnValue = instance.EnumJobStepLogs(stepName)
public DataTable EnumJobStepLogs(
string stepName
)
public:
DataTable^ EnumJobStepLogs(
String^ stepName
)
member EnumJobStepLogs :
stepName:string -> DataTable
public function EnumJobStepLogs(
stepName : String
) : DataTable
參數
- stepName
型別:System. . :: . .String
A String value that specifies the name of the job step.
傳回值
型別: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")