次の方法で共有


AlertCategories Collection

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。

The AlertCategories collection contains Category objects that reference SQL Server Agent alert categories.

現在のオブジェクトを表す SQL-DMO オブジェクト モデル

Methods

Add Method

Refresh Method

ItemByID Method

Remove Method (Collections)

解説

With the AlertCategories collection, you can create and maintain names that group Microsoft SQL Server alerts.

The AlertCategories collection contains, at a minimum, a Category object named [Uncategorized] and one named Replication.

To create an alert category

  1. Create a Category object.

  2. Set the Name property of the Category object. Alert category names are unique on a server running SQL Server.

  3. Add the Category object to the AlertCategories collection of a connected JobServer object.

To remove an alert category

  • Use the Remove method of the AlertCategories collection of a connected JobServer object. Indicate the targeted alert category using the category name or the ordinal location in the collection, as in:

    oJobServer.AlertCategories.Remove("Northwind")
    
ms142636.note(ja-jp,SQL.90).gifメモ :
Alerts are re-categorized as necessary when an alert category is removed. Any alerts previously exhibiting the removed category exhibit the category [Uncategorized] after the Remove method completes.