I would like to call procedure(which is empty for test) when sort warning is happened. I have enabled service broker, created a queue to receive messages, created a service on the queue that references the event notifications contract, and finally created an event notification. But when sort warning happens(I can see it in profiler), there is no message in queue and SP is not invoked. Have I missed something?
br, Simon
CREATE QUEUE dbo.SortWarningsQueue WITH STATUS=ON, ACTIVATION ( PROCEDURE_NAME = dbo.process_sort_warning_event, MAX_QUEUE_READERS = 5, EXECUTE AS OWNER ); CREATE SERVICE SortWarningsService ON QUEUE dbo.SortWarningsQueue ( [http://schemas.microsoft.com/SQL/Notifications/PostEventNotification] ); GO --Create the database event notification CREATE EVENT NOTIFICATION NotifySort_Warnings ON SERVER FOR SORT_WARNINGS TO SERVICE 'SortWarningsService','current database'; GO