Configuring SQL Server Agent Operators

In: SQL Server


5 Jan 2009

SQL Server provides a great notification system for alerts and jobs. There are many options to be set and multiple dialog boxes to step through, but once finished, you’ll always be the first to know when a problem is immanent. Below is a detailed reference to get this running on a new server.

  1. First thing’s first: Set up Database Mail. This a wonderfully illustrated tutorial that is consistent for SQL Server 2005 and 2008.
  2. Create a new operator.
    Right-click the Operators folder in the Object Explorer window. It will be nested inside SQL Server Agent.

    Create New Operator

    Create New Operator

  3. Configure the new operator. There are only a couple of items that need to be set:
    1. Name: A label for either the person or group name. It need not match the actual email account name.
    2. E-mail name: Enter the email address of the person or group who you wish to receive this notification. Separate multiple entries with a semicolon (;).

    Operator Settings

    Operator Settings

    While there are additional notification options such as pager and net send, they have been deprecated and will be removed in future versions.

  4. Configure SQL Server Agent
    Right-click the SQL Server Agent tree item and select properties from the resulting dropdown list.

    SQL Server Agent Properties

    SQL Server Agent Properties

  5. Switch to the Alert System pane and make several changes there.
    1. Enable mail profile: Ensure this is checked.
    2. Mail system: Database Mail. SQLMail has been deprecated and we have not configured it in this guide.
    3. Mail profile: Select the profile you created when you set up Database Mail.
    4. Enable fail-safe operator: Check this box.
    5. Operator: Select the operator you created above. The name should be listed in the dropdown box.
    6. Notify using: E-mail. Again, pager and net send have been deprecated.

    SQL Server Agent Alert settings

    SQL Server Agent Alert settings

  6. Restart SQL Server Agent. This is required.
  7. Configure the SQL Server Agent Job
    1. Locate a job which you want to configure notification for.
    2. Open the properties dialog box and switch to  the Notification Pane.
    3. Check the E-Mail box and select the appropriate operator and “When the job fails”

    Job Notification Settings

    Job Notification Settings

    When the job does not succeed for any reason, you will receive an email telling you so. You can also set options for “When the job succeeds” and “When the job completes”. You may want to fiddle with these settings to test that the job is configured correctly.

  • Share/Bookmark

6 Responses to Configuring SQL Server Agent Operators

Avatar

Nalan

March 18th, 2009 at 12:55 pm

Really usefull info…thanks!! keep on posting

Avatar

han

March 29th, 2009 at 7:32 am

thanks for u r great idea to publish

Avatar

daniel alvarado

May 19th, 2009 at 2:38 pm

Thanks a lot, this was really simple and effective. 10/10

Avatar

John Stanley

June 14th, 2009 at 3:29 am

That was really helpful. Have been trying to get Operator email alerts working and haven’t until this tutorial. Well done & thanks.

Avatar

kevin benedict

October 22nd, 2009 at 12:47 pm

how do you get the job to notify more than one person?

Avatar

Taylor Gerring

October 22nd, 2009 at 12:58 pm

E-mail name: Enter the email address of the person or group who you wish to receive this notification. Separate multiple entries with a semicolon (;).

Comment Form

  • Kurt Hitchen: A friend has let me "see" there calendar in Google Calendar, but because their calendar is set to pr [...]
  • bugoy8: https://www.google.com/calendar/dav/nba_13_%4cos+%41ngeles+%4cakers#sports@group.v.calendar.google.c [...]
  • Speaker: Wasn't able to understand how to access the shared folder in the quest OS from this tutorial. Hmmm [...]
  • Elena Kuznetsova: I have killed an hour to figure out how to sync Google contacts' birthday and I have this done! U [...]
  • Andy: I have been trying to figure this out forever.....Thank you ever so much!! [...]


This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States.