DatabaseMail problem

  • I have 2 instances set up on a cluster. On one of the instances database mail is working correctly on the other it isn't.

    For the instance where database mail is not working I am seeing the following.

    EXEC sysmail_help_queue_sp @queue_type = 'Mail' ;

    queue_typelengthstate

    mail2425INACTIVE (I'm seeing INACTIVE on the server that works also)

    EXEC sp_configure 'Database Mail XPs'; - Config/Run value = 1

    EXEC msdb.dbo.sysmail_help_status_sp; = STARTED

    SELECT is_broker_enabled FROM sys.databases WHERE name = 'msdb'; = 1

    When I run a test email I'm seeing an entry for it in sysmail_allitems showing it is "unsent". In sysmail_event_log I'm seeing an entry with a description of "Activation Successful". I'm not seeing an entry in sysmail_event_log however.

    When I run EXEC msdb.dbo.sysmail_help_account_sp; on both instances I'm seeing the same SMTP server & same port #. Each server is using a different service account but they have identical permissions.

    The only difference that I have seen in the setups is that the server that is working is using a default profile called 'Admin'. The server that is not working is using one with the name of the service account as the name.

    Thanks for any help

    Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]

  • Appreciate that you may have already checked this, but is it connecting to Exchange? If so have all the virtual IP's of the cluster been granted connect and send permissions to the SMTP server?

  • Exchange is only used in SQLMail right? And to my knowledge the SMTP server is open to everything in our domain.

    Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]

  • Not nessesarily, we used the exchange SMTP server as the relay, when we wanted to add a host to setup mail we had to add the servers IP in as allow connect and allow send to actively allow the SMTP server the ability to actually see that the SQL server wanted to send mail.

    If the SMTP server is setup so that all hosts on the network can connect and send using it as the relay then you shouldn't run into this error.

  • I finally found an error but I have no idea what to do with it. In the server application errors I'm seeing:

    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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server), connection parameters: Server Name: nottheservername, 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    Named Pipes is turned enabled on the instance as is TCPIP.

    Does anyone know where would it be getting the server name? In this particular case that servername won't work anyway as it is a named instance.

    Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]

  • Forget it. I found the answer here:

    http://social.msdn.microsoft.com/Forums/en/sqldatabaseengine/thread/fd210efa-9c01-439e-8573-4f25a4177b08

    Turns out if you have an instance on a cluster that is not using port 1433 you have to set up a local alias using the non-standard port number if you want database mail to work.

    Thanks for the help.

    Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]

  • And thank you for the information, never seen that before so will add it to the list of gotcha's.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply