I am using SQL Service Broker and send messages from a trigger.
Now I have a problem: during the sending I receive:
An exception occurred while enqueueing a message in the target queue.
Error: 33019, State: 1. Cannot create implicit user for the special
login ‘sa’.
My queue is created as
ALTER QUEUE [sales].[QOrders] WITH STATUS = ON , RETENTION = OFF , ACTIVATION ( STATUS = OFF , PROCEDURE_NAME = [sales].[orders_dequeue] ,
MAX_QUEUE_READERS = 3 , EXECUTE AS N'dbo'), POISON_MESSAGE_HANDLING (STATUS = OFF)
I have tried to change: EXECUTE AS OWNER, EXECUTE AS SELF – the same error.
How to fix it?