Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Database Mail Doesn't Work

Status
Not open for further replies.

txdave35

Technical User
Nov 20, 2008
122
US
I have spent most of today trying to get database mail in SQL 2005 to send me an email when our maintenance plan is executed.

I went through the process of creating a profile in Database Mail. Set up configuration under SQL Server Agent, and in notifications as well. In Database mail, I click the test mail, and it will email me the test message. But nothing when the maintenance plans excecutes.


The log file is telling me:

"an attempt was made to send an email when no email session has been established". I checked the mail status and it shows "RECEIVES_OCCURRING".

I am at a loss here. If the test email went through, that tells me that it is not a profile configuration issue. Any thoughts? Thanks.
 
Whoa, looks like I solved my own problem. Restarted the SQL Server Agent and got the email! lol
 
Yup ... SQL Server Agent restart is usually needed.

Thanks

J. Kusch
 
Do you know if there is any way for Database mail to email more than one person on a maintenance plan? The notification screen in the job properties only allows me to pick one user.

Thanks!
 

You can set up a group via AD and use that.

I prefer not to use maintenance plans. I create my own SQL jobs and execute the needed task (backups, optimizations, integrity checks, ect.)

I would rather have the control and error/execution logging I can implement over the default, out-of-the-box settings a Maint plan offers.

As for this thread, you could then use sp_Send_DBMail and set the @recipients equal to any group and/or individuals you choose (just separate them by a semicolon).


Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top