Category Property

Dieses Feature wird in einer zukünftigen Version von Microsoft SQL Server entfernt. Verwenden Sie dieses Feature beim Entwickeln neuer Anwendungen nicht, und planen Sie das Ändern von Anwendungen, in denen es zurzeit verwendet wird.

The Category property represents the name of a category for SQL Server Agent alerts, jobs, and operators.

Syntax

object
.Category [=value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list.
  • value
    Specifies a SQL Server Agent category by name. A SQL Server Agent category name can contain a maximum of 100 characters.

Data Type

String

Modifiable

Read/write. When setting the property for an Alert, Job, or Operator object, the value must reference an existing SQL Server Agent alert, job, or operator category.

Prototype (C/C++)

HRESULT GetCategory(SQLDMO_LPBSTR pRetVal);
HRESULT SetCategory(SQLDMO_LPCSTR NewVal);
ms136328.note(de-de,SQL.90).gifHinweis:
SQL Distributed Management Objects (SQL-DMO) strings are always returned as OLE BSTR objects. A C/C++ application obtains a reference to the string. The application must release the reference using SysFreeString.

Hinweise

Microsoft SQL Server alert, job, and operator categories group SQL Server Agent objects. The Category property of SQL-DMO Alert, Job, and Operator objects references the applicable SQL Server Agent category.

Setting the Category property for the JobFilter object restricts listed SQL Server Agent jobs to those having the category when using the EnumJobs method of the JobServer object.

Applies To:

Alert Object

JobFilter Object

Job Object

Operator Object