SQL Server 2016 RTM (13.00.1708.0) Database Mail Not working

  • Hi

    Does anyone have database mail working with SQL 2016 (Standard Edition) and the Critical update 3164398?

    I've configured DB mail on numerous SQL Server versions (2005,2008,R2,2012), so I believe I did it properly for SQL 2016.

    I ran through the troubleshooting guideline and nothing seems to be turning up.

    The problem is all of the messages have a status of "unsent". With "verbose" setting I see "Activation successful", however when I run

    EXEC msdb.dbo.sysmail_help_queue_sp @queue_type = 'mail';

    The status is "INACTIVE".

    I did a search of the server to find DatabaseMail.exe and that file is not found.

    Does 2016 require special OS permissions for the service account?

    I performed a second fresh install of SQL Server 2016 with the Critical Update and the same results.

    Any help is appreciated.

    Thanks,

    Steve

  • Steve,

    I have the exact same problem here for my SQL Server 2016 Databasemail. Trying for 2 days and still haven't figure it out. Please post your follow up if you found the answer. I will do the same if I have anything.

    Thanks,

    Eric

  • Steve,

    Just found the solution after another half day of agonizing googling and trying. The databasemail.exe wasn't started. It requires .Net Framework 3.5 to be enabled. You can follow this link https://technet.microsoft.com/en-us/library/dn482071.aspx to turn it on. Once it's installed/turned on, restart your sql server engine.

    -- Check all databasemail item status

    Select sent_status, * from msdb.dbo.sysmail_allitems

    -- Check the databasemail queues status

    EXECUTE msdb.dbo.sysmail_help_queue_sp ;

    GO

    -- Delete all unsent mail items

    EXECUTE msdb.dbo.sysmail_delete_mailitems_sp

    @sent_status = 'unsent' ; -- sent, unsent, retrying, failed

    Server is a VM server of Windows 2012 R2 Standard and SQL Server 2016 Enterprise.

    Good luck,

    Eric

  • Eric, I will give it a try. Thank you.

    If this works for me, as well, MS should update their documentation as it doesn't state anywhere in their "setup" that .net framework 3.5 needs to be enabled.

    https://msdn.microsoft.com/en-us/library/hh245116.aspx

    Where did you come across the reference to enabling the .net framework 3.5?

    Thanks again,

    Steve

  • Hi Steve,

    This is the article I've found and read that lead to my investigation of the Databasemail.exe, https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e9aea42f-0382-4cee-b3b4-8aa62842d44e/database-mail-queue-will-not-stay-online-inactive?forum=sqlservicebroker.

    I was looking for the Databasemail.exe on the Task Manager's services tab and didn't see it there, so I tried to start it manually by double clicking it in the SQL Server's *\binn\databasemail.exe. I got the error immediately telling me that .Net Framework 3.5 is missing or required. Sure enough, I found the .Net Framework 4.5 is enabled but not 3.5. After I enabled (installed) 3.5, I was able to start the Databasemail.exe without the previous error message but mail still stocked with the unsent status. Thought that may be the Database Engine service needs to be restarted. After restarted the SQL Server Service from the Configuration Manager, checked the mail queue status, it turned to "RECEIVES_OCCURRING", send another test databasemail, it was immediately in the "sent" status and the mail is in my InBox.

    I agreed with you that Microsoft needs to fix their documentation and also update their installation prerequisite checks. I'm sure more people (DBAs) are going to have this same issue. Hope this helps.

    Good luck,

    Eric

  • Fantastic, thanks!

    Your fix worked for me (installing .net framework 3.5).

    Cheers

  • Installing .NET 3.5 and restarting SQL service worked ...

    Also, this might be helpful in the future or for different issue
    http://dbatasks.blogspot.com/2012/11/troubleshooting-database-mail-part-ii.html

  • So even though I have .NET 4.5, I still need 3.5 for SQL Mail on SQL 2016 ??
    I am having the same problem getting mail to work.
    Everything else looks the same as my SQL 2008 server running SQL Mail.
    Database Mail XPs set to 1

    EDIT:  Installation failed after 30 minutes.

    "One or several parent features are disabled so current feature can not be enabled"

  • 30 minutes after the failed .NET 3.5 install, I suddenly started getting all the backed up emails.... Very strange.

  • Hi All,

    I have prepared the attached config file and placed in the Binn folder (next to the DatabaseMail.exe) which resolved the issue.

    Please check FIX: SQL Server 2016 Database Mail does not work on a computer that does not have the .NET Framework 3.5 installed

    Thanks,
    Rupam Dey

  • Date : 27th June 2020

    Hi All..

    I have the same issue, I have configured database mail but my mail is not working, I read lots of blogs here and everywhere it is saying that .NET 3.5 framework will resolve the issue, but all the blog is for SQL Server 2016 SP1 where as I have [Microsoft SQL Server 2016 (SP2-GDR) (KB4532097) - 13.0.5102.14 (X64)   Dec 31 2019 22:39:35   Copyright (c) Microsoft Corporation  Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2016 Standard 10.0 <X64> (Build 14393: ) (Hypervisor) ] version of sql server installed then why I am still facing this issue ?

    And more, I am not going to install .Net 3.5 framework as  .NET 3.5 is at end of life support.

    .NET Framework 3.5 is only supported at the SP1 level together with the .NET Framework 2.0 SP2 and the .NET Framework 3.0 SP2. The original version of the .NET Framework 3.5 together with the .NET Framework 2.0 SP1 and the .NET Framework 3.0 SP1 are no longer in support.

    What could be the solutions for this issue ?

    Thanks in Advance.

     

     

  • SSC Rookie, if you won't install .net 3.5 I would contact MS support to see what your options are

  • .net 3.5 still has a number of years left on mainstream and even extended support with Microsoft as long as you install .net3.5 SP1

    https://support.microsoft.com/en-gb/lifecycle/search?alpha=.net%20framework%203.5

     

    Hell it has a longer life span than SQL Server 2016 by an additional 2 years as long as you install 2016 SP2

    https://support.microsoft.com/en-gb/lifecycle/search?alpha=SQL%20Server%202016%20Service%20Pack%202

     

     

    You could change the config for when they broke it with .net 3.5 to use the 4.0 runtime but as they have fixed it in a CU and you should be running the SP2 at least then you would need to contact Microsoft to ensure that the change is still valid and that it will not void any support agreements you may have.

    https://support.microsoft.com/en-gb/help/3186435/sql-server-2016-database-mail-doesn-t-work-when-net-framework-3-5

     

  • Hi guys,

    That is a known issue. Please patch your SQL Server instance with the latest updates and  Database Mail will start working fine 😉

    https://docs.microsoft.com/en-us/sql/database-engine/install-windows/latest-updates-for-microsoft-sql-server?view=sql-server-ver15

  • Hi ..

    I have the same dbmail issues and  as per all blogs it should not be there in sp2

    I have this version running in our system and still we have that issue.

    Microsoft SQL Server 2016 (SP2-GDR) (KB4532097) - 13.0.5102.14 (X64)   Dec 31 2019 22:39:35   Copyright (c) Microsoft Corporation  Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2016 Standard 10.0 <X64> (Build 14393: )

    Any suggestion?

     

     

     

Viewing 15 posts - 1 through 15 (of 15 total)

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