SQL Server Blogs

Voices from the UK SQL Server Community

Rob's SQL Server Blog

... SQL Server thoughts from the field

Error with SQL Server 2005 Database Mail

I was passed an interesting issue with database mail to have a look at on one of our clustered production SQL Server systems earlier this week. We have a large multi-node PolyServe cluster running our SQL Server 2005 64-bit Enterprise Edition platform and individual instances can exist on any node of the cluster (think active/active clusters but with more physical nodes!). I checked out the DB Mail config in Management Studio and all looked OK. I was able to send a test email to the queue, but they were not being delivered. I ran the following SQL Statement to determine the status of the emails:
select * from sysmail_allitems
Which showed the emails had a status of unsent. A bit of digging around in BOL came up with this article.
My SMTP server was set up correctly to accept emails from the servers and permissions on the database mail external program (DatabaseMail90.exe) were all OK. Other instances on this platform were also able to send emails successfully. A bit more digging uncovered the following in the DB Mail logs:
1) Exception Information
Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException
Message: The read on the database failed. Reason: Failed to load Msxmlsql.dll.
Data: System.Collections.ListDictionaryInte
TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Objects.QueueItem GetQueueItemFromCommand(System.Data.SqlClient.SqlCommand)
HelpLink: NULL
Source: DatabaseMailEngine
This turns out to be a problem with Windows Server 2003 being unable to load any dll's. Failing the instance over to another physical node confirmed that this was the case and it was not SQL Server related. This KB article provides a fix and workaround to the problem. The article states that "This problem usually occurs after SQL Server 2005 has been running for some time" ??? Looks as if SQL Server has been a victim of it's own success...


No Comments
Powered by Community Server (Commercial Edition), by Telligent Systems