次の方法で共有


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")
    
    ms135686.note(ja-jp,SQL.90).gifメモ :
    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)