Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CategoryID Property

Job.CategoryID Property

Gets the ID value that uniquely identifies the job category.

Namespace:  Microsoft.SqlServer.Management.Smo.Agent
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

[SfcKeyAttribute()]
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.Matrix)]
public int CategoryID { get; }

Property Value

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

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

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

Community Additions

ADD
Show:
© 2015 Microsoft