Compartir a través de


Job.CategoryID Propiedad

Gets the ID value that uniquely identifies the job category.

Espacio de nombres:  Microsoft.SqlServer.Management.Smo.Agent
Ensamblado:  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Sintaxis

'Declaración
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
<SfcKeyAttribute()> _
Public ReadOnly Property CategoryID As Integer 
    Get
'Uso
Dim instance As Job 
Dim value As Integer 

value = instance.CategoryID
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
[SfcKeyAttribute()]
public int CategoryID { get; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
[SfcKeyAttribute()]
public:
property int CategoryID {
    int get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
[<SfcKeyAttribute()>]
member CategoryID : int
function get CategoryID () : int

Valor de la propiedad

Tipo: System.Int32
A In32 value that specifies the job category ID value.

Comentarios

The ID value references the category to which the job belongs. You can define the category using the JobCategory object.

Ejemplos

The following code example specifies that the job belongs to category 1.

C#

Job jb = new Job();
jb.CategoryID = 1;

PowerShell

$jb = new-object Microsoft.SqlServer.Management.Smo.Agent.Job
$jb.CategoryID = 1

Vea también

Referencia

Job Clase

Espacio de nombres Microsoft.SqlServer.Management.Smo.Agent

Otros recursos

Tareas administrativas automatizadas (Agente SQL Server)

sp_add_job (Transact-SQL)