June 3, 2010 at 6:56 am
I have configured Database Mail and sent a test email successfully to myself.
I have also created and enabled an operator and added my email address.
I set up email notification for a job and add myself in the 'Name' field and
my email address in the 'Email name'
When the job runs and look at the details it states that it failed to send the email.
What am I missing.
Any help is appreciated.
Thanks,
Keith
June 3, 2010 at 7:34 am
Keith,
What is the exact error message when the job executes? Probably a silly question but you have checked the [enabled] box to the right of the Operator Name when you created the operator?
Also, if you've set the process up through the UI have you restarted the SQL Server Agent?
www.sqlAssociates.co.uk
June 3, 2010 at 8:42 am
yes the operator is enabled.
Error" NOT: Failed to notify 'DBA' via email.
No we have not bounced the SQL Server Agent.
That was my next guess.
Thanks,
Keith
June 3, 2010 at 8:44 am
I would arrange the "bouncing" of the SQL Server Agent as this is part of the Operator/Email Notification setup process, without a restart it simply will not work.
www.sqlAssociates.co.uk
June 3, 2010 at 3:25 pm
in your registry make sure you have (under SOFTWARE\MICROSOFT\MICROSOFT SQL SERVER\MSSQL10.MSSQLSERVER\SQLServerAgent)
DatabaseMailProfile set to the one you just created
and
UseDatabaseMail set to =1
I had a bug, where even though I set it up correctly, I had to hack the registry to fix it.
But otherwise, yeah, you have to restart the SQL AGENT for it to work (you don't need to bounce the whole thing).
😎
June 4, 2010 at 2:07 am
Keith,
My first port of call would be the restart of the SQL Server Agent as this is actually part of the setup process.
From personal experience I would avoid registry changes at all costs especially if this process will be promoted to a live environment at some point. RFCs containing the text "registry change" tend not to be pushed through the CAB process too quickly and I've never come across a Wintel team willing to put there name to a live registry change they know very little about.
I'd be very suprised if the restart of the SQL Server Agent didn't correct the issue but let me know how you get on,
Chris
www.sqlAssociates.co.uk
June 4, 2010 at 3:49 am
Bouncing the SQL Server Agent worked.
Thanks all.
Keith
June 26, 2013 at 11:11 am
I had a bug, where even though I set it up correctly, I had to hack the registry to fix it.
Did you have to add it? My value is returning a null, and even using the registery update via T-SQL is not working. I'd appreciate you going into the answer further. Thanks,
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply