設定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
沒有留言:
張貼留言