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

沒有留言:

張貼留言

離線安裝SSMS 22 launched extracted application exiting with result code 0x138b

SSMS 22 安裝器下載頁面 https://learn.microsoft.com/zh-tw/ssms/install/install https://aka.ms/ssms/22/release/vs_SSMS.exe 將安裝檔下載到本機,檔案好大2.5G  https:...