The EnumAlerts method returns a QueryResults object enumerating the SQL Server Agent alerts that cause automated execution of the referenced job.
object.EnumAlerts() as QueryResults
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list |
A QueryResults object containing one result set defined by these columns.
Column | Data type | Description |
---|---|---|
id | integer | System-generated alert identifier |
name | nvarchar(129) | Alert name |
enabled | tinyint | When 1, the alert is enabled |
type | integer | Identifies the alert source as described in Remarks |
The result set column type identifies the alert source. When 1, the alert is raised in response to a SQL Server event. When 2, the alert is raised when a monitored performance condition is exceeded.
HRESULT EnumAlerts(LPSQLDMOQUERYRESULTS* ppResults);