SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 An attempt was made to send an email when no email
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Kristen
Test

United Kingdom
22431 Posts

Posted - 01/02/2014 :  07:15:58  Show Profile  Reply with Quote
"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

USA
367 Posts

Posted - 01/15/2014 :  19:17:10  Show Profile  Reply with Quote
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

United Kingdom
22431 Posts

Posted - 01/20/2014 :  08:05:50  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000