CREATE QUEUE dbo.MyAuditQueue WITH STATUS=ON ,ACTIVATION ( STATUS = OFF ,MAX_QUEUE_READERS = 1 ,PROCEDURE_NAME = [MyAuditMessageDequeue] ,EXECUTE AS OWNER )
Created a new service broker queue and tried to send it a message. Ran a profiler trace to see what was going wrong and noticed this error message in profiler:
"An exception occurred while enqueueing a message in the target queue. Error: 15517, State: 1. Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission."
What am I doing wrong?
Service Broker 2014