Job.EnumJobStepLogs Método (Int32)
Enumerates a list of job step log files for the job step with the specified ID value.
Espacio de nombres: Microsoft.SqlServer.Management.Smo.Agent
Ensamblado: Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)
Sintaxis
'Declaración
Public Function EnumJobStepLogs ( _
stepId As Integer _
) As DataTable
'Uso
Dim instance As Job
Dim stepId As Integer
Dim returnValue As DataTable
returnValue = instance.EnumJobStepLogs(stepId)
public DataTable EnumJobStepLogs(
int stepId
)
public:
DataTable^ EnumJobStepLogs(
int stepId
)
member EnumJobStepLogs :
stepId:int -> DataTable
public function EnumJobStepLogs(
stepId : int
) : DataTable
Parámetros
- stepId
Tipo: System.Int32
A Int32 value that specifies the job step ID value.
Valor devuelto
Tipo: 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 ID value.
Ejemplos
The following code example creates a job then displays the job step log files for the specified job step ID.
C#
Server srv = new Server("(local)");
Job jb = srv.JobServer.Jobs["Test Job"];
DataTable stepLogs = jb.EnumStepLogs(1);
PowerShell
$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")
$jb = $srv.JobServer.Jobs["Test Job"]
$stepLogs = $jb.EnumStepLogs(1)
Vea también
Referencia
Espacio de nombres Microsoft.SqlServer.Management.Smo.Agent
Otros recursos
Programar tareas administrativas automáticas en el Agente SQL Server