EnumJobStepLogs 方法
Enumerates a list of job step log files for the referenced job.
命名空間: Microsoft.SqlServer.Management.Smo.Agent
組件: Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)
語法
'宣告
Public Function EnumJobStepLogs As DataTable
'用途
Dim instance As Job
Dim returnValue As DataTable
returnValue = instance.EnumJobStepLogs()
public DataTable EnumJobStepLogs()
public:
DataTable^ EnumJobStepLogs()
member EnumJobStepLogs : unit -> DataTable
public function EnumJobStepLogs() : DataTable
傳回值
型別:System.Data. . :: . .DataTable
A DataTable object value that contains an enumerated list of all the job step log files.
範例
The following code example creates a job then displays the job step log files.
C#
Server srv = new Server("(local)");
Job jb = srv.JobServer.Jobs["Test Job"];
DataTable stepLogs = jb.EnumStepLogs();
PowerShell
$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")
$jb = $srv.JobServer.Jobs["Test Job"]
$stepLogs = $jb.EnumStepLogs()