OperatorCategories Collection (SQL-DMO)

The OperatorCategories collection contains Category objects referencing a classification method for SQL Server Agent operators.

Remarks

For SQL Server Agent, categories offer a mixed system and user-defined method for grouping alerts, operators, and jobs.

With the OperatorCategories collection, you can:

For more information about creating a SQL Server Agent operator category, see Category Object.

To remove an operator category

    oJobServer.OperatorCategories.Remove("Page")


Note When using the Remove method of the OperatorCategories collection, existing SQL Server Agent jobs are reclassified as necessary. Any operators previously exhibiting the removed category exhibit the category [Uncategorized] after the Remove method completes.


When using the Item or Remove method, the OperatorCategories collection supports member identification using either name or ordinal reference syntax. For example:

Set oCategory = oJobServer.OperatorCategories("Page")

Or:

Set oCategory = oJobServer.OperatorCategories(1)

Methods
Add Method Refresh Method
Item Method Remove Method (Collections)
ItemByID Method  

Properties

Count Property

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.