sp_help_notification (Transact-SQL)
Reports a list of alerts for a given operator or a list of operators for a given alert.
If object_type is ALERTS, the result set lists all the alerts for a given operator.
|
Column name |
Data type |
Description |
|---|---|---|
|
alert_id |
int |
Alert identifier number. |
|
alert_name |
sysname |
Alert name. |
|
use_email |
int |
E-mail is used to notify the operator: 1 = Yes 0 = No |
|
use_pager |
int |
Pager is used to notify operator: 1 = Yes 0 = No |
|
use_netsend |
int |
Network pop-up is used to notify the operator: 1 = Yes 0 = No |
|
has_email |
int |
Number of e-mail notifications sent for this alert. |
|
has_pager |
int |
Number of pager notifications sent for this alert. |
|
has_netsend |
int |
Number of net send notifications sent for this alert. |
If object_type is OPERATORS, the result set lists all the operators for a given alert.
|
Column name |
Data type |
Description |
|---|---|---|
|
operator_id |
int |
Operator identification number. |
|
operator_name |
sysname |
Operator name. |
|
use_email |
int |
E-mail is used to send notification of the operator: 1 = Yes 0 = No |
|
use_pager |
int |
Pager is used to send notification of the operator: 1 = Yes 0 = No |
|
use_netsend |
int |
Is a network pop-up used to notify the operator: 1 = Yes 0 = No |
|
has_email |
int |
Operator has an e-mail address: 1 = Yes 0 = No |
|
has_pager |
int |
Operator has a pager address: 1 = Yes 0 = No |
|
has_netsend |
int |
Operator has net send notification configured. 1 = Yes 0 = No |
A. Listing alerts for a specific operator
The following example returns all alerts for which the operator François Ajenstat receives any kind of notification.
USE msdb ;
GO
EXEC dbo.sp_help_notification
@object_type = N'ALERTS',
@name = N'François Ajenstat',
@enum_type = N'ACTUAL',
@notification_method = 7 ;
GO
B. Listing operators for a specific alert
The following example returns all operators who receive any kind of notification for the Test Alert alert.
USE msdb ;
GO
EXEC sp_help_notification
@object_type = N'OPERATORS',
@name = N'Test Alert',
@enum_type = N'ACTUAL',
@notification_method = 7 ;
GO