Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two instances of SQL Server 2008. One was upgraded from SQL Server 2000 and one was a clean, new install. The instances are running on different nodes of the same cluster, although I have tried having them both on the same node with identical results.

SQL Mail operates perfectly on both instances.

DB Mail operates perfectly on the newly installed instance.

On the upgraded instance, DB Mail does not send any mail. Of course, I am not positive that the fact this instance is upgraded has anything to do with the issue, but it might.

The configuration of my db mail profile and account looks identical to my functioning instance. In the configuration of the 'alerts' tab in the SQL Agent properties i have tried selecting both DB Mail and SQL Mail to no avail. Both instances use the same SMTP server with the same authentication (domain with db engine account).

All messages sent via sp_send_db mail and those sent via the 'test email' option are visible in the sysmail_allitems queue and remain there as 'unsent'. The send_status eventually changes to 'failed'.

The only messages in the sysmail_event_log are 'mail queue stopped by login domain\myuser', 'mail queue started by login domain/myuser' and 'activiation successful.'.

selecting from the externalmailqueue has the same number of rows as sysmail_allitems. i have tried bouncing the agent, the entire instance and moving the other functioning instance to the other node in the cluster.

any thoughts? thx.

share|improve this question

3 Answers 3

Is your SMTP server controlling access to itself based upon IP's? Can you send test message from db and post results or error from error log?

share|improve this answer

SMTP server, I believe, just controls based on credentials not IP. Both instances use same credentials.

Nothing shows up in the SQL ERRORLOG. Here is the message in Win Event Viewer: There was an error on the connection. Reason: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified), connection parameters: Server Name: vnn\instance, Database Name: msdb A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

I don't understand how db mail can't connect to the instance where it is running.

share|improve this answer

I do not have a specific answer but I can give some information about some of the things I have used to debug DB Mail. Anti-virus software and spam filters can often be an issue. Make sure there is not any antivirus software on the server blocking DB Mail from sending emails, and make sure that messages are not being blocked by a SPAM filter.

I would also recommend using either telnet or something like SMTPDiag to make sure it is not a SMTP connection issue.

It can also help to change the database mail logging to verbose. To do this, go into SQL Server Management Studio, right click on Database Mail and select 'Configure Database Mail'. In the 'Configure Database Mail' wizard select 'View or change system parameters'. There will be an option to set the logging level, set it to verbose. This will giving you more detail in the database mail log. After you have the issue fixed you will want to change it back to a lower logging level.

If you believe the issue with the msdb database is related, then I would recommend running a SQL Server Profiler trace against the msdb database. Make sure to include the Audit Login Failed Event. While the trace is running try sending a test email with database mail.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.