Nota:
El acceso a esta página requiere autorización. Puede intentar iniciar sesión o cambiar directorios.
El acceso a esta página requiere autorización. Puede intentar cambiar los directorios.
Gets the job ID value.
Espacio de nombres: Microsoft.SqlServer.Management.Smo.Agent
Ensamblado: Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)
Sintaxis
'Declaración
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public ReadOnly Property JobID As Guid
Get
'Uso
Dim instance As Job
Dim value As Guid
value = instance.JobID
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
public Guid JobID { get; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
public:
property Guid JobID {
Guid get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
member JobID : Guid
function get JobID () : Guid
Valor de la propiedad
Tipo: System.Guid
A Guid system object value that specifies the job ID value.
Comentarios
Each Microsoft SQL Server Agent job is identified by a system-generated GUID. The identifier is a 32-character string representing a hexadecimal number.
Ejemplos
The following code example creates a job and displays its GUID ID value.
C#
Server srv = new Server("(local)");
Job jb = new Job(srv.JobServer, "Test Job");
jb.Create();
Console.WriteLine(jb.JobID.ToString());
PowerShell
$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")
$jb = new-object Microsoft.SqlServer.Management.Smo.Agent.Job($srv.JobServer, "Test Job")
$jb.Create()
Write-Host $jb.JobID.ToString()
Vea también
Referencia
Espacio de nombres Microsoft.SqlServer.Management.Smo.Agent
Otros recursos
Tareas administrativas automatizadas (Agente SQL Server)
Programar tareas administrativas automáticas en el Agente SQL Server