다음을 통해 공유


OperatorCategories Collection

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

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

현재 개체를 보여 주는 SQL-DMO 개체 모델

Properties

Count Property

 

Methods

Add Method

Refresh Method

Item Method

Remove Method (Collections)

ItemByID Method

 

주의

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:

  • Create a new classification for SQL Server Agent operators.
  • Remove a SQL Server Agent operator classification.

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

To remove an operator category

  1. Use the Remove method of the OperatorCategories collection, as in:

    oJobServer.OperatorCategories.Remove("Page")
    

    [!참고] 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)