May 10, 2011 at 3:50 pm
Hi,
On a Sql Server 2005 I have DBMail setup and correctly configured. I am able to use "Notify Operator" and "EXEC msdb.dbo.sp_send_dbmail " to queue emails.
But the problem is the queued mails never go through. I see 10 emails in the queue when I query "SELECT * FROM msdb.dbo.sysmail_unsentitems"
But if I restart the Sql Server Service, all mails go through and I receive emails in my inbox.
So far this is the only pattern I could find.
So my question is: Is there a way to troubleshoot DBmail. I read some steps on MSDN, but they are not of much help. Any URLs to articles that could help are much appreciated.
thanks,
_UB
May 10, 2011 at 9:53 pm
This happened only for the first time or you need to restart the SQL Server everytime ? Try refreshing the DBMail from the DB_Mail Monitor.
Thank You,
Best Regards,
SQLBuddy
May 11, 2011 at 5:35 am
check the Service Broker and endpoints
-- Enable Service Broker:
ALTER DATABASE [Database Name] SET ENABLE_BROKER;
-- Disable Service Broker:
ALTER DATABASE [Database Name] SET DISABLE_BROKER;
--Check for the specific database
SELECT is_broker_enabled,* FROM sys.databases WHERE name = 'Database name';
Regards,
Syed Jahanzaib Bin Hassan
BSCS | MCTS | MCITP | OCA | OCP | OCE | SCJP | IBMCDBA
My Blog
www.aureus-salah.com
May 11, 2011 at 9:02 am
Is SQL Agent Started? Database Mail is sent out by SQL Agent
Chris Powell
George: You're kidding.
Elroy: Nope.
George: Then lie to me and say you're kidding.
May 11, 2011 at 10:26 am
Yes, Sql Agent is also restarted along with Sql Server Service. This make me wonder, if the mails are processed when the Agent is restarted or the Sql Service. I will check this and get back to you.
thank you for your input.
Edit: Emails go through when Sql Agent is restarted. So Sql Service restart is not needed, I guess.
May 11, 2011 at 10:28 am
Happens every time I restart Sql. What is DB mail monitor? I did refresh DBmail from SSMS.
Edit: Emails go through when Sql Agent is restarted. So Sql Service restart is not needed, I guess.
May 11, 2011 at 10:40 am
This is beginning to sound more and more like an SMTP issue. Can you "white list" the SQL Server IP address on the mail server and try again?
Chris Powell
George: You're kidding.
Elroy: Nope.
George: Then lie to me and say you're kidding.
May 11, 2011 at 10:53 am
Service broker is enabled for msdb, the emails originate from either maintenance plans or jobs.
May 11, 2011 at 10:57 am
Thank you for your input.
I am not sure I know how to do that. Also I do not have any control over SMTP Server since this is PROD. It was hard to get approved for Sql DBmail as it is.
Also, it does not seem like SMTP issue (I could be wrong, but not sure). Mails get queued, but do not go through to SMTP Server. But on Agent restart they are all processed.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply