Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

DatabaseMail problem Expand / Collapse
Author
Message
Posted Monday, September 24, 2012 2:53 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, November 25, 2014 7:05 AM
Points: 3,467, Visits: 1,831
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_type length state
mail 2425 INACTIVE (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 Fisher
I strive to live in a world where a chicken can cross the road without being questioned about its motives.
--------------------------------------------------------------------------------
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Link to my Blog Post --> www.SQLStudies.com
Post #1363731
Posted Tuesday, September 25, 2012 1:40 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Tuesday, November 25, 2014 4:10 AM
Points: 5,221, Visits: 5,119
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?



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1363832
Posted Tuesday, September 25, 2012 7:16 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, November 25, 2014 7:05 AM
Points: 3,467, Visits: 1,831
Exchange is only used in SQLMail right? And to my knowledge the SMTP server is open to everything in our domain.

Kenneth Fisher
I strive to live in a world where a chicken can cross the road without being questioned about its motives.
--------------------------------------------------------------------------------
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Link to my Blog Post --> www.SQLStudies.com
Post #1364023
Posted Tuesday, September 25, 2012 7:28 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Tuesday, November 25, 2014 4:10 AM
Points: 5,221, Visits: 5,119
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.






Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1364032
Posted Tuesday, September 25, 2012 10:20 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, November 25, 2014 7:05 AM
Points: 3,467, Visits: 1,831
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 Fisher
I strive to live in a world where a chicken can cross the road without being questioned about its motives.
--------------------------------------------------------------------------------
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Link to my Blog Post --> www.SQLStudies.com
Post #1364424
Posted Tuesday, September 25, 2012 10:25 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, November 25, 2014 7:05 AM
Points: 3,467, Visits: 1,831
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 Fisher
I strive to live in a world where a chicken can cross the road without being questioned about its motives.
--------------------------------------------------------------------------------
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Link to my Blog Post --> www.SQLStudies.com
Post #1364427
Posted Wednesday, September 26, 2012 1:07 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Tuesday, November 25, 2014 4:10 AM
Points: 5,221, Visits: 5,119
And thank you for the information, never seen that before so will add it to the list of gotcha's.



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1364465
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse