您的位置:首页 > 房产 > 建筑 > 【SQL Server点滴积累】SQL Server 2016数据库邮件(Database Mail)功能故障的解决方法

【SQL Server点滴积累】SQL Server 2016数据库邮件(Database Mail)功能故障的解决方法

2024/10/6 12:28:19 来源:https://blog.csdn.net/ncutyb123/article/details/140804765  浏览:    关键词:【SQL Server点滴积累】SQL Server 2016数据库邮件(Database Mail)功能故障的解决方法

广告位招租!
知识无价,人有情,无偿分享知识,希望本条信息对你有用!

今天和大家分享SQL Server 2016数据库邮件(Database Mail)功能故障的解决方法

故障现象:

在SQL Server 2016中配置完成数据库邮件(Database Mail)功能后,当你尝试发送测试邮件后,既收不到测试邮件,也不显示错误消息

KB3186435 - FIX: SQL Server 2016 Database Mail does not work on a computer that does not have the .NET Framework 3.5 installed or stops working after applying SQL Server update - Microsoft SupportFixes an issue that blocks SQL Server 2016 Database Mail from working on a computer that doesn't have the .NET Framework 3.5 installed or stops working after applying SQL Server update.icon-default.png?t=N7T8https://support.microsoft.com/en-us/topic/kb3186435-fix-sql-server-2016-database-mail-does-not-work-on-a-computer-that-does-not-have-the-net-framework-3-5-installed-or-stops-working-after-applying-sql-server-update-3480beb6-1329-74d6-0f3a-e8e3d893326c

Symptoms

Assume that you install Microsoft SQL Server 2016 on a computer that has the .NET Framework 4.6.1 installed. If the computer does not have the .NET Framework 3.5 installed, the Database Mail feature does not work correctly. For example, if you configure and send a test email message, the message is queued but is never sent.

Note This issue also affects instances that are running SQL Server 2016 SP1 CU1. This issue occurs because of a bug in SQL Server 2016 SP1 CU setup. The setup for SQL Server 2016 CUs deletes the config file DatabaseMail.exe.config without replacing it with a new one. This causes the Database Mail to break in the absence of .Net framework 3.5 SP1. However, if the Database Mail is broken by the installation of a SQL Server 2016 CU, you can use any one of the workarounds mentioned below.

Resolution

This problem was fixed in the following cumulative updates for SQL Server:

    Cumulative Update 2 for SQL Server 2016 SP1

Cumulative Update 2 for SQL Server 2016

About cumulative updates for SQL Server

Workaround

To work around this issue, you can implement any one of the following:

  1. Create the DatabaseMail.exe.config and drop it next to the DatabaseMail.exe under the Binn folder. You can use notepad.exe or any other editor to edit it. Just make sure you save it by using UTF-8 encoding (in notepad.exe, select Save As... and in the Encoding combo box, select UTF-8):

         <?xml version="1.0" encoding="utf-8" ?>          <configuration>          <startup useLegacyV2RuntimeActivationPolicy="true">           <supportedRuntime version="v4.0"/>               <supportedRuntime version="v2.0.50727"/>          </startup>          </configuration>

  1. Run a repair setup action of SQL Server 2016.

  2. Manually install .Net Framework 3.5 on the machine.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References

Learn about the terminology Microsoft uses to describe software updates.

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com