Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 An attempt was made to send an email when no email

Author  Topic 

Kristen
Test

22859 Posts

Posted - 2014-01-02 : 07:15:58
"An attempt was made to send an email when no email session has been established"

Set up database mail, did a test email, I am ALMOST certain that I built a scheduled job (which returned error) and proved that that would send an Email. All my tests worked.

Backups failed on Christmas Eve (disk full). I didn't get any emails. They've been failing for 8 days over the holiday break (users shouting on return to work this morning was the first alert I got).

I've googled. The advice seems to be "Restart SQL Agent" plus variations of "Delete the profile and remake it"

I can do that (need scheduled downtime for the SQL Agent restart, so will have to be tonight).

Are there alternative fixes/ tests that I should be looking at?

Let's assume that will fix it. How can I rely on Database Mail not failing in the future? I don't really want everything emailing me on SUCCESS, I get enough alerting emails as it is ... and I'll miss the one critical Email a month warning me of Failure

Last time I had to seriously monitor some systems I build a script that took all the logs that were supposed to exist, stripped from them all the known-good-success-messages, and then emailed me whatever was left. Thus I got one email a day telling me that every expected log existed, and including any messages that were NOT expected. Failure of that, one, email to arrive was an alert that the reporting system had failed. The Email was quick to scan to see if there were any GotChas.

Perhaps I need to find the code for that and resurrect it if I cannot rely on SQL to reliably email me on failure?

influent
Constraint Violating Yak Guru

367 Posts

Posted - 2014-01-15 : 19:17:10
Did you try running the query below to see if emails went out but got stuck on the mail server?

select * from msdb..sysmail_allitems
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2014-01-20 : 08:05:50
Thanks. It is a while ago now, but I'm 99% certain that I did, and they weren't there.
Go to Top of Page
   

- Advertisement -