SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Server 2005 Job email notification alerts


SQL Server 2005 Job email notification alerts

Author
Message
Claudia-343424
Claudia-343424
SSC Veteran
SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)

Group: General Forum Members
Points: 238 Visits: 64
Hi there, I was wondering if somebody could tell me how to configure the notification alerts on a job properties. Basically I want to receive an email when a job is completed or is failed.
Thanks
Todd Engen
Todd Engen
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2797 Visits: 6336
In SSMS select Database Mail under Management, right-click and Configure Database Mail. After that's complete send a test mail using the new profile to confirm that works.

Next, open the properties of the SQL Server Agent. On the Alert System page enable the mail profile. Restart the SQL Server Agent for the change to take effect.

Under the SQL Server agent create Operators to send messages to.

Finally, in your job select Notifications and set the Operator to send to when the job completes.
Claudia-343424
Claudia-343424
SSC Veteran
SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)

Group: General Forum Members
Points: 238 Visits: 64
Thank you so much it worked!
Claudia
takutoyamada
takutoyamada
SSC-Enthusiastic
SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)

Group: General Forum Members
Points: 128 Visits: 62
A clarification question. Upon a failed job, I want to send an email to 2 different email addresses. So, I created 2 operators and checked them to receive emails in the Response of the alert properties.

However, in the Notifications in the Job properties, it only enables you to select one operator to send an email upon the completion of the job. So, I'm confused about how alerts and notifications work.

It seems that the alerts have all the information it needs to send out the emails, but then if you don't turn on the Notifications, the email is not sent. I tested this by disabling the email in the job under notifications, and left the alert configured to send emails to 2 operators. Upon running the job from this step, and getting a failure, there was no email sent. Am I missing something on how alerts work?
Claudia-343424
Claudia-343424
SSC Veteran
SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)SSC Veteran (238 reputation)

Group: General Forum Members
Points: 238 Visits: 64
I created a distribution list and used that email. As far as I know just one email address.
takutoyamada
takutoyamada
SSC-Enthusiastic
SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)

Group: General Forum Members
Points: 128 Visits: 62
Thanks-

As a workaround, I added the pager email for the other admin, changed the on-call times to be 24x7, and had it send to the pager for the other admin, since you can't choose 2 email recipients.

It would be nice if the difference between alerts and notifications were more clear.
Jpotucek
Jpotucek
SSCarpal Tunnel
SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)

Group: General Forum Members
Points: 4354 Visits: 1680
Maybe you can help me too.. I did all this:

n SSMS select Database Mail under Management, right-click and Configure Database Mail. After that's complete send a test mail using the new profile to confirm that works.

Next, open the properties of the SQL Server Agent. On the Alert System page enable the mail profile. Restart the SQL Server Agent for the change to take effect.

Under the SQL Server agent create Operators to send messages to.

Finally, in your job select Notifications and set the Operator to send to when the job completes.

but when I click on sql server agent properties to send a test mail, I can choose my operator but the send test tab is greyed out????



Todd Engen
Todd Engen
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2797 Visits: 6336
Could be wrong, but that Test button in the Agent properties looks to be for SQLMail only. I checked on a SQL 2005 SP2 and SQL 2008 CTP instance; greyed out on both when Database Mail is selected, active with SQLMail.

You should be able to test Database Mail from its context menu though.
jenelle.hilemon
jenelle.hilemon
Valued Member
Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)

Group: General Forum Members
Points: 50 Visits: 21
Did you use Microsoft Outlook to create the list? Does Outlook have to be installed on the server that your trying to create the notification on? I have tried to do this with no luck...can you explain how you did it?
Todd Engen
Todd Engen
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2797 Visits: 6336
jenelle.hilemon (6/4/2008)
Did you use Microsoft Outlook to create the list? Does Outlook have to be installed on the server that your trying to create the notification on? I have tried to do this with no luck...can you explain how you did it?

No, Outlook does not have to be installed on SQL if Database Mail is being used.

Reference:
How to create a distribution list (distribution group) in Exchange Server 2003
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search