An alternative would be to create a primary key for a service broker.
First check the broker service queue by right-clicking the queue and view the transfer queue or just use this query
SELECT *, casted_message_body = CASE message_type_name WHEN 'X' THEN CAST(message_body AS NVARCHAR(MAX)) ELSE message_body END FROM [DATABASE_NAME].[sys].[transmission_queue]
If you find any data here, then the transfer_stat column will be specified for this.
If the broker does not fulfill its role, I would create NEW_BROKER with the following query
USE [master] ALTER DATABASE [DATABASE_NAME] SET NEW_BROKER
Then turn on the BROKER with TRUSTWORTHY set to ON
ALTER DATABASE DATABASE_NAME SET ENABLE_BROKER; ALTER DATABASE DATABASE_NAME SET TRUSTWORTHY ON;
Finally, discarding the master key and creating a new master key and encrypting the new password:
ALTER AUTHORIZATION ON DATABASE::DATABASE_NAME TO [SA]; DROP MASTER KEY CREATE MASTER KEY ENCRYPTION BY PASSWORD = '79HGKJ67ghjgk^&*^fgj' GO
A password can be a custom mixture of alphanumeric characters and characters.
If any of the above steps takes longer to run, I suggest you stop the query and reopen SQL Manager and try again. It should work well.
source share