Job Mail Notifications

The following sections show an example in which you create a SQL Server Agent Mail operator that SQL Server Agent will notify when a job completes.

Creating an Operator

First, you need to create an operator. To do so, using the Object Browser, you expand the SQL Server Agent node and then right-click the Operators folder and select New Operator. Then you should name this new operator Test Database Mail Operator and provide an email address for testing purposes in the Email Name text box. You can use any valid email address you can access with your email client software. You click OK to save the new operator.

Enabling SQL Agent Mail

Next, you need to enable SQL Server Agent to use Database Mail. You right-click the

Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.