Share via


AlertCategories Collection

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

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

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

주의

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")
    

[!참고]

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.