Which Transact-SQL statement should you use to create the queue?

You are a database developer on an instance of SQL Server 2008. You are creating a Service Broker application. You have created the Message1 and Message2 message types with the required validation. You create a contract using the following statement:
CREATE CONTRACT MyContract (Message1 SENT BY INITIATOR,Message2 SENT BY TARGET);
You want to create a queue to be used by a Service Broker service. The solution should meet the following requirements:
You want the queue to be able to receive messages.
You want all messages received on the queue to be immediately processed by the ReceiveData stored procedure.
You want the ReceiveData stored procedure to execute under the security context of the current user.
Which Transact-SQL statement should you use to create the queue?
A. CREATE QUEUE MyQueue
WITH STATUS=OFF,ACTIVATION (STATUS=ON,PROCEDURE_NAME=ReceiveData,MAX_QUEUE_READERS=3,EXECUTE AS SELF);
B. CREATE QUEUE MyQueue
WITH STATUS=ON,ACTIVATION (STATUS=ON,PROCEDURE_NAME=ReceiveData,MAX_QUEUE_READERS=3, EXECUTE AS OWNER);
C. CREATE QUEUE MyQueue
WITH STATUS=ON,ACTIVATION (STATUS=OFF,PROCEDURE_NAME=ReceiveData,MAX_QUEUE_READERS=3,EXECUTE AS SELF);
D. CREATE QUEUE MyQueue
WITH STATUS=ON,ACTIVATION (STATUS=ON,PROCEDURE_NAME=ReceiveData,MAX_QUEUE_READERS=3,EXECUTE AS SELF);

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.