Create an Operator
Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
This topic describes how to configure a user to receive notifications about Microsoft SQL Server Agent jobs in SQL Server 2016 by using SQL Server Management Studio or Transact-SQL.
In This Topic
Limitations and Restrictions
The Pager and net send options will be removed from SQL Server Agent in a future version of Microsoft SQL Server. Avoid using these features in new development work, and plan to modify applications that currently use these features.
Note that SQL Server Agent must be configured to use Database Mail to send e-mail and pager notifications to operators. For more information, see Assign Alerts to an Operator.
SQL Server Management Studio provides an easy, graphical way to manage jobs, and is the recommended way to create and manage the job infrastructure.
Only members of the sysadmin fixed server role can create operators.
To create an operator
In Object Explorer, click the plus sign to expand the server where you want to create a SQL Server Agent operator.
Click the plus sign to expand SQL Server Agent.
Right-click the Operators folder and select New Operator.
The following options are available on the General page of the New Operator dialog box:
The following options are available on the Notifications page of the New Operator dialog box:
When finished creating the new operator, click OK.
To create an operator
In Object Explorer, connect to an instance of Database Engine.
On the Standard bar, click New Query.
Copy and paste the following example into the query window and click Execute.
-- sets up the operator information for user 'danwi.' The operator is enabled. -- SQL Server Agent sends notifications by pager from Monday through Friday from 8 A.M. to 5 P.M. USE msdb ; GO EXEC dbo.sp_add_operator @name = N'Dan Wilson', @enabled = 1, @email_address = N'danwi', @pager_address = N'5551290AW@pager.Adventure-Works.com', @weekday_pager_start_time = 080000, @weekday_pager_end_time = 170000, @pager_days = 62 ; GO
For more information, see sp_add_operator (Transact-SQL).