title | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | dev_langs | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sp_help_operator (Transact-SQL) |
Reports information about the operators defined for the server. |
markingmyname |
maghan |
randolphwest |
05/14/2024 |
sql |
system-objects |
reference |
|
|
|
[!INCLUDE SQL Server]
Reports information about the operators defined for the server.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
sp_help_operator
[ [ @operator_name = ] N'operator_name' ]
[ , [ @operator_id = ] operator_id ]
[ ; ]
The operator name. @operator_name is sysname, with a default of NULL
. If @operator_name isn't specified, information about all operators is returned.
Either @operator_id or @operator_name must be specified, but both can't be specified.
The identification number of the operator for which information is requested. @operator_id is int, with a default of NULL
.
Either @operator_id or @operator_name must be specified, but both can't be specified.
0
(success) or 1
(failure).
Column name | Data type | Description |
---|---|---|
id |
int | Operator identification number. |
name |
sysname | Operator Name. |
enabled |
tinyint | Operator is available to receive any notifications:1 = Yes0 = No |
email_address |
nvarchar(100) | Operator e-mail address. |
last_email_date |
int | Date the operator was last notified by e-mail. |
last_email_time |
int | Time the operator was last notified by e-mail. |
pager_address |
nvarchar(100) | Operator pager address. |
last_pager_date |
int | Date the operator was last notified by pager. |
last_pager_time |
int | Time the operator was last notified by pager. |
weekday_pager_start_time |
int | The start of the time period during which the operator is available to receive pager notifications on a weekday. |
weekday_pager_end_time |
int | The end of the time period during which the operator is available to receive pager notifications on a weekday. |
saturday_pager_start_time |
int | The start of the time period during which the operator is available to receive pager notifications on Saturdays. |
saturday_pager_end_time |
int | The end of the time period during which the operator is available to receive pager notifications on Saturdays. |
sunday_pager_start_time |
int | The start of the time period during which the operator is available to receive pager notifications on Sundays. |
sunday_pager_end_time |
int | The end of the time period during which the operator is available to receive pager notifications on Sundays. |
pager_days |
tinyint | A bitmask (1 = Sunday, 64 = Saturday) of days-of-the week indicating when the operator is available to receive pager notifications. |
netsend_address |
nvarchar(100) | Operator address for network pop-up notifications. |
last_netsend_date |
int | Date the operator was last notified by network pop-up. |
last_netsend_time |
int | Time the operator was last notified by network pop-up. |
category_name |
sysname | Name of the operator category to which this operator belongs. |
sp_help_operator
must be run from the msdb
database.
[!INCLUDE msdb-execute-permissions]
Other users must be granted one of the following [!INCLUDE ssNoVersion] Agent fixed database roles in the msdb
database:
- SQLAgentUserRole
- SQLAgentReaderRole
- SQLAgentOperatorRole
For details about the permissions of these roles, see SQL Server Agent Fixed Database Roles.
The following example reports information about operator François Ajenstat
.
USE msdb;
GO
EXEC dbo.sp_help_operator
@operator_name = N'François Ajenstat';
GO