April 21, 2011 at 3:50 pm
I have DB Mail configured on 2 servers with the exact same DB Mail configuration on each. On BOTH of them, the Test email works (right-click Database Mail, and Send Test Email...).
On one of the servers, when a SQL Server Agent SQL Job fails, I get an email. But I DON'T get an email from the other server when a job fails on it.
I have my Email Operators setup on both servers correctly (there's just not much to an operator). And the SQL Jobs are set to Send to Operator when a job fails.
Can you give me advise as to what I may have configured wrong? What are some things to check for? I don't understand why the Test email works but job failures don't send an email.
Thank you.
[edit to remove reference to SQL Mail. I am dealing with DB mail here.]
April 21, 2011 at 4:25 pm
You mention both SQL Mail and DBMail, which are both very different technologies. My bet is that you are only using one of them. It is recommended that you use DBMail with SQL Server > 2000.
If you are using SQL Mail, recycle the SQL Agent service (assuming you already have the outlook profile configured properly), this will make xp_sendmail work if you setup the profile by have not recycled yet.
If you are using DBMail, check the system tables in msdb for the DBMail log and statuses (lookup sysmail_error_log as an example to get started). http://msdn.microsoft.com/en-us/library/ms190630.aspx
Edit: Corrected service to cycle per editing catch below.
Jim
Jim Murphy
http://www.sqlwatchmen.com
@SQLMurph
April 21, 2011 at 4:50 pm
You only need to restart sql agent
April 21, 2011 at 5:00 pm
Yes, of course. Good catch. I'll edit my post to correct that.
Jim
Jim Murphy
http://www.sqlwatchmen.com
@SQLMurph
April 22, 2011 at 4:14 am
http://msdn.microsoft.com/en-us/library/ms191278(v=sql.90).aspx
bounce the sendmail
master..xp_stopmail
go
waitfor delay '0:00:05'
go
master..xp_startmail
go
if not resolved then restart the agent service
Regards,
Syed Jahanzaib Bin Hassan
MCTS | MCITP | OCA | OCP | OCE | SCJP | IBMCDBA
My Blog
Regards,
Syed Jahanzaib Bin Hassan
BSCS | MCTS | MCITP | OCA | OCP | OCE | SCJP | IBMCDBA
My Blog
www.aureus-salah.com
April 22, 2011 at 9:23 am
Even Better!
April 22, 2011 at 11:52 am
I just looked into Syed's post and that's for send mail not database mail. The DB mail equivalent it
USE msdb ;
GO
EXECUTE dbo.sysmail_stop_sp ;
GO
waitfor delay '0:00:05'
go
EXECUTE dbo.sysmail_start_sp ;
GO
I tried this out but it did not work for me, only the sqlagent restart did the trick.
April 22, 2011 at 1:00 pm
Sorry folks. I wasn't very clear. You are correct, I'm talking about DB mail. Sorry for the confusion. Going to clean up my original post a little bit. Thank you. I will try some of these suggestions and report back.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply