locked
Database Mail not working on job completion RRS feed

  • Question

  • Hello --

    We have SQL Server 2008R2 64-bit running on a Windows 2012 Standard 64-bit distribution. I have set up a maintenance plan with three backups, and I configured Database Mail to send notifications upon the completion of the Full and Differential Backups, and notifications on the failure of the Transaction Log backups. The problem that I am encountering is Database Mail is not sending out any notifications.

    The procedure that I am outlining has been successfully implemented on several other database servers. The only difference being the current server runs the Windows 2012 64-bit operating system, while the other servers run the Windows 2008R2 64-bit operating system.

    I set up an e-mail account that has access to the SMTP server of our company. The SMTP authentication was set to "Windows Authentication using Database Engine service credentials". A test e-mail was successfully sent to an address that has been set up for the several administrators in charge of the database server.

    I then went to the SQL Agent, and created an operator with the destination e-mail address. Once that was done, I went to the jobs in question, and through the Notifications tab, I clicked on the E-Mail entry, and provided the appropriate information in the accompanying fields. I made sure the option "When the job completes" was selected for the Full and Differential backups, while "When the job fails" was selected for the Transaction Log backup.

    I then went to the SQL Agent icon, and under Properties, I enabled the Mail Profile, as well as the Fail-Safe operator. Also, I made sure the global public profile was active, and set to default.

    Finally, I restarted the SQL Agent to have the changes that I described go into effect.

    What other step(s) do I need to take in order to correct this problem?

    Thanks.
    Wednesday, March 5, 2014 3:10 PM

Answers

  • Hello --

    I solved the problem. When I checked the Profile settings, I noticed there were two entries: The correct one, and another that was a copy of the e-mail address. When I removed the latter, and restarted the Agent, the notifications went through without incident.

    Thanks for the help in any event.

    • Proposed as answer by SanBhaumik Friday, March 7, 2014 1:09 PM
    • Marked as answer by kaplan71 Friday, March 7, 2014 1:35 PM
    Friday, March 7, 2014 11:57 AM

All replies

  • unfortunately, it seems you've done everything required for database mail to work with SQL Server Agent...

    - you can try a simple job (not a maintenance plan) with notification

    - nothing in the database mail logs ?

    - do you have any logs on your smtp server ?

    JS

    Wednesday, March 5, 2014 8:34 PM
  • In SQL Agent, right click the operator and select Properties and go to History.  Does it show the operator has been emailed?

    Wednesday, March 5, 2014 9:05 PM
  • Hello --

    I solved the problem. When I checked the Profile settings, I noticed there were two entries: The correct one, and another that was a copy of the e-mail address. When I removed the latter, and restarted the Agent, the notifications went through without incident.

    Thanks for the help in any event.

    • Proposed as answer by SanBhaumik Friday, March 7, 2014 1:09 PM
    • Marked as answer by kaplan71 Friday, March 7, 2014 1:35 PM
    Friday, March 7, 2014 11:57 AM