SQL Server 2005 Job email notification alerts

  • I believe what you are referring to is the Database mail- I know it allows multiple recipients, but what I'm having trouble with is the notifications for the failed jobs.

  • Has anyone had any luck getting this to work on a Lotus Notes Server?

    It seems to only want to accept standard email addresses: somebody@somebody.com

    Any suggestions?

  • todd_dawson (7/24/2008)


    Has anyone had any luck getting this to work on a Lotus Notes Server?

    It seems to only want to accept standard email addresses: somebody@somebody.com

    Any suggestions?

    Not sure about lotus notes, but it worked perfect with microsoft outlook!!

  • very useful post thanks a lot. if i keep the option as "when job completes". will it sends if the job success or fails. because there i didn't find multiple options for both job fails and job succeeds.my requirement is i have to send a mail to know is the job succeeded or failed.

  • ganta_sateesh (8/7/2008)


    very useful post thanks a lot. if i keep the option as "when job completes". will it sends if the job success or fails...

    Yes. Always a good idea to test for the expected results though. I'd suggest you do something to make the job fail and succeed to insure you're getting what you want for both conditions.

  • I could use some expert advice as well.

    I have done the following: Configured a Database Mail Account and sent test email. That part worked.

    I then created an Operator and restarted the SQL Server Agent service. However, there is nowhere in the Operator properties that gives me any clue how to reference the Database Mail Account that I just created. It only prompts for the Email name: I have tried using the email address I used in the Database Mail account and the Account Name of the Account, but nether work. Can someone Please help me? What am I doing wrong?

  • Check the properties on the SQL Server Agent, under Alert System. I believe you'll need to restart the agent if you make a change there.

  • Yes, I forgot to mention that I had done all that. The Alert System within the SQL Server Agent Properties is correctly set to the Mail Profile I created, and that Profile will properly send an email to the address assigned to it when I use Send Test Email in the Database Mail right-click menu. I restarted the Agent service after having set all of that up. However, that's not the issue here. The issue is that when I create an Operator for SQL Server Agent, there is no indication of how to tell it which Database Mail account to use. I have tried using the Account Name of the Database Mail account I created, and the email address of that account. Neither works. It is this operator that you use within the Job to tell the Job how to send a notification. I can find no documentation of precisely how to create that Operator to use a specific Database Mail account.

  • David,

    You can't. However, as you pointed out the Operator can be configured with an SMTP address.

    If the goal is to send to a group of users then a distribution list would work. If you have Exchange, one of the earlier posts has a link on how to do that.

    Is there any particular reason you want it to use a Database Mail profile?

  • I did??? I don't know how to configure an operator with an SMPT address. It's fairly obvious how to set a Database Mail Account with an SMPT address, but I see nowhere to set that within the Operator. No, the goal is to send to a single email address...Mine. Is there another way other than to use a Database Mail account??? I've seen nothing in this post that would enlighten me on any of these issues. All I want to do is to send myself an email if a Job fails. Following this post has not gotten me there yet.

  • When you created a new operator there was an option for "E-mail name", that's where the SMTP address goes -- for example, david.briggs@yourdomain.com.

  • Hmmm... I could have sworn I did that. Tried again and this time it worked.

    Thanks,

    Dave

  • Could you please tell how to add multiple recepients through the database mail GUI

  • You may be able to create a Mail group on your email server then send to the group. IE 'DB_Admins'?

  • Somebody previously mentioned you should be able to enter semi-colon delimited email addresses. Or a distribution list would probably work a little more easily - depending on who maintains the distribution list.

Viewing 15 posts - 16 through 30 (of 53 total)

You must be logged in to reply to this topic. Login to reply