Monday 9 April 2012

How to setup Notifications

A Notification, Alert or Error is sent to an Operator, which must be setup first.

Configure SQL Server Agent Operators
  1. Under SQL Server Agent, right-click ‘Operators’ and add a New operator
  2. Right-click ‘SQL Server Agent’, select ‘Properties’, ‘Alert System’ then Enable mail profile and select a Mail Profile.
  3. Now right-click a job from your list, select ‘Properties’ and select ‘Notifications’. Now check ‘Email’, selecting the Operator and when to send the email (on job completion, success or failure).
  4. You will need to restart the SQL Server Agent for the effects to take place.
To add a Notification within a Maintenance Plan
  1. Right-click and ‘Modify’ maintenance plan
  2. Drag an instance of Notify Operator Task from the ‘Toolbox’ on the left
  3. Right click and ‘Edit’ the task. You will need to set up a connection
  4. Select an Operator and define your own email content
  5. Now highlight the task you want to be notified about. Drag the arrow that hangs from it onto the Notify Operator Task. To define if the notification should be sent on success, failure or completion, right-click the arrow.

No comments:

Post a Comment