Job.EnumHistory Método
Enumerates a list of execution history associated with the referenced job.
Espacio de nombres: Microsoft.SqlServer.Management.Smo.Agent
Ensamblado: Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)
Sintaxis
'Declaración
Public Function EnumHistory As DataTable
'Uso
Dim instance As Job
Dim returnValue As DataTable
returnValue = instance.EnumHistory()
public DataTable EnumHistory()
public:
DataTable^ EnumHistory()
member EnumHistory : unit -> DataTable
public function EnumHistory() : DataTable
Valor devuelto
Tipo: System.Data.DataTable
A DataTable object value that contains execution history data for the referenced job.
Ejemplos
The following code example creates a job then displays its execution history.
C#
Server srv = new Server("(local)");
Job jb = srv.JobServer.Jobs["Test Job"];
DataTable jobHistory = jb.EnumHistory();
PowerShell
$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")
$jb = $srv.JobServer.Jobs["Test Job"]
$jobHistory = $jb.EnumHistory()
Vea también
Referencia
Espacio de nombres Microsoft.SqlServer.Management.Smo.Agent
Otros recursos
Programar tareas administrativas automáticas en el Agente SQL Server