Question

hemalata98 on Wed, 24 Aug 2016 13:01:59


I am new to service broker,
I have implemented the process ,It is working fine, performing the intended  task as expected 
but it is generating unwanted SqlQueryNotifications Procedures,queues,services.
I have gone through the below link http://rusanu.com/2006/04/06/fire-and-forget-good-for-the-military-but-not-for-service-broker-conversations/
verified the fire and forget issue in my requestactivation and targetactivation procedures,I have properly ended the convesations 
in source and target ,Still i can see these below notifications ,
So Can anyone help me to understand when service broker generates unwanted notifications.

ex:Procedure:
CREATE PROCEDURE [dbo].[SqlQueryNotificationStoredProcedure-10d6e9c9-4250-48ec-bf4c-2e42883c5105] 
AS BEGIN BEGIN TRANSACTION; RECEIVE TOP(0) conversation_handle FROM [SqlQueryNotificationService-10d6e9c9-4250-48ec-bf4c-2e42883c5105];
 IF (SELECT COUNT(*) FROM [SqlQueryNotificationService-10d6e9c9-4250-48ec-bf4c-2e42883c5105] 
WHERE message_type_name = 'http://schemas.microsoft.com/SQL/ServiceBroker/DialogTimer') > 0 
BEGIN if ((SELECT COUNT(*) FROM sys.services WHERE name = 'SqlQueryNotificationService-10d6e9c9-4250-48ec-bf4c-2e42883c5105') > 0)  
 DROP SERVICE [SqlQueryNotificationService-10d6e9c9-4250-48ec-bf4c-2e42883c5105]; if (OBJECT_ID('SqlQueryNotificationService-10d6e9c9-4250-48ec-bf4c-2e42883c5105', 'SQ') IS NOT NULL) 
  DROP QUEUE [SqlQueryNotificationService-10d6e9c9-4250-48ec-bf4c-2e42883c5105]; DROP PROCEDURE [SqlQueryNotificationStoredProcedure-10d6e9c9-4250-48ec-bf4c-2e42883c5105]; 
END COMMIT TRANSACTION; END

 QUEUE:

ALTER QUEUE [dbo].[SqlQueryNotificationService-10d6e9c9-4250-48ec-bf4c-2e42883c5105] WITH STATUS = ON ,
 RETENTION = OFF , 
ACTIVATION (  STATUS = ON , PROCEDURE_NAME = [dbo].[SqlQueryNotificationStoredProcedure-10d6e9c9-4250-48ec-bf4c-2e42883c5105] , MAX_QUEUE_READERS = 1 , EXECUTE AS OWNER  ), POISON_MESSAGE_HANDLING (STATUS = ON) 
GO


Service:
ALTER SERVICE [SqlQueryNotificationService-10d6e9c9-4250-48ec-bf4c-2e42883c5105]  
ON QUEUE [dbo].[SqlQueryNotificationService-10d6e9c9-4250-48ec-bf4c-2e42883c5105] 


EDIT:

I am able to drop these  unwanted procedure,services,queues not facing any permission issue. 

Thanks in advance

Sponsored



Replies

Riaon on Thu, 25 Aug 2016 08:52:52


What do you mean by 'unwanted notifications'? Kindly provide an example.