2024年8月26日 星期一

無法使用Database Mail

設定Database Mail時,顯示

Database Mail depends on Service Broker. Service Broker is not active in msdb. Do you want to activate Service Broker in msdb? If you do not activate Service Broker, Database Mail will queue e-mail messages, but will not be able to deliver the messages.

select is_broker_enabled from sys.databases where name = 'msdb';
回傳0,確實沒啟動。

ALTER DATABASE msdb SET ENABLE_BROKER ;

等了好久沒反應。

參考以下重建

https://learn.microsoft.com/zh-tw/troubleshoot/system-center/scom/troubleshoot-sql-server-service-broker-issues

use master
go

ALTER DATABASE msdb SET SINGLE_USER WITH ROLLBACK IMMEDIATE ALTER DATABASE msdb SET NEW_BROKER WITH ROLLBACK IMMEDIATE ALTER DATABASE msdb SET MULTI_USER go ALTER DATABASE msdb SET SINGLE_USER WITH ROLLBACK IMMEDIATE ALTER DATABASE msdb SET ENABLE_BROKER ALTER DATABASE msdb SET MULTI_USER go

沒有留言:

張貼留言

和SSL連線有關的設定

HTTPS連線,不管是在寫sql clr或者powershell,每次遇到以下二類SSL錯誤,都忘了要改啥。這次記錄下,以後可以參考。 System.Net.WebException: 基礎連接已關閉: 接收時發生未預期的錯誤。 ---> System.ComponentM...