Job.EnumHistory 메서드 (JobHistoryFilter)
Enumerates a list of execution history associated with the referenced job.
네임스페이스: Microsoft.SqlServer.Management.Smo.Agent
어셈블리: Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)
구문
‘선언
Public Function EnumHistory ( _
filter As JobHistoryFilter _
) As DataTable
‘사용 방법
Dim instance As Job
Dim filter As JobHistoryFilter
Dim returnValue As DataTable
returnValue = instance.EnumHistory(filter)
public DataTable EnumHistory(
JobHistoryFilter filter
)
public:
DataTable^ EnumHistory(
JobHistoryFilter^ filter
)
member EnumHistory :
filter:JobHistoryFilter -> DataTable
public function EnumHistory(
filter : JobHistoryFilter
) : DataTable
매개 변수
- filter
유형: Microsoft.SqlServer.Management.Smo.Agent.JobHistoryFilter
A JobHistoryFilter object value that specifies constraints on the data returned.
반환 값
유형: System.Data.DataTable
A DataTable object value that contains execution history data for the referenced job.
예
The following code example creates a job then displays its filtered execution history.
C#
Server srv = new Server("(local)");
Job jb = srv.JobServer.Jobs["Test Job"];
JobHistoryFilter jhf = new JobHistoryFilter();
jhf.JobID = jb.JobID
DataTable jobHistory = jb.EnumHistory(jhf);
PowerShell
$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")
$jb = $srv.JobServer.Jobs["Test Job"]
$jhf = new-object Microsoft.SqlServer.Management.Smo.Agent.JobHistoryFilter
$jhf.JobID = $jb.JobID
$jobHistory = $jb.EnumHistory($jhf)
참고 항목
참조
Microsoft.SqlServer.Management.Smo.Agent 네임스페이스