我想一个选项BROKER_QUEUE_DISABLED
在事件通知现在看来,这是不正常生成代理队列禁用事件。 可有一个人请验证这是我创建的脚本? (见下文)
脚本:
CREATE QUEUE NotifyQueue
GO
CREATE
SERVICE NotifyService
ON
QUEUE NotifyQueue
[http://schemas.microsoft.com/SQL/Notifications/PostEventNotification]);
GO
CREATE ROUTE NotifyRoute
WITH SERVICE_NAME = 'NotifyService',
ADDRESS = 'LOCAL';
GO
CREATE
EVENT NOTIFICATION [CHS_QueueDisabledNotif]
ON QUEUE [CHS_Change_Queue] WITH FAN_IN
FOR BROKER_QUEUE_DISABLED
TO SERVICE 'NotifyService', 'current database'
--Testing
--Try Disabling Application Queue
ALTER QUEUE dbo.CHS_Change_Queue WITH STATUS = OFF
SELECT * FROM NotifyQueue