What should you do first?

You are creating a Web-based application to manage data aggregation for reports. The application connects to a SQL Server 2005 database named DataManager. One page in the application has controls that execute stored procedures in a database named ReportingDatabase. There is an existing Service Broker connection between the DataManager database and ReportingDatabase.
You want to add two new message types to the existing service. In each database, you create message types named ProcessReport and SendResult. You need to add the two new message types to the existing service. What should you do first?

You are creating a Web-based application to manage data aggregation for reports. The application connects to a SQL Server 2005 database named DataManager. One page in the application has controls that execute stored procedures in a database named ReportingDatabase. There is an existing Service Broker connection between the DataManager database and ReportingDatabase.
You want to add two new message types to the existing service. In each database, you create message types named ProcessReport and SendResult. You need to add the two new message types to the existing service. What should you do first?

A.
Create a queue on each database with the ACTIVATION argument set to DataManager.dbo.ProcessReport.

B.
Create a conversation between the databases by using the following statement.BEGIN DIALOG FROM SERVICE ‘ProcessReport’ TO SERVICE ‘SendResult’

C.
Create a contract between the services by using the following statement.CREATE CONTRACT ProcessData (ProcessReport SENT BY INITIATOR, SendResult SENT BY TARGET)

D.
Create services for each database by using the following statement.CREATE SERVICE DataManager ON QUEUE ProcessReport

Explanation:
A contract contains a list of message types and the services that are allowed to send them.
Syntax: CREATE CONTRACT contract [AUTHORIZATION owner ] ( {{message_type_name | [DEFAULT ] } SENT BY { INITIATOR | TARGET | ANY } } [ ,…n] ) [;]Key: contract Name of the contract owner Owner of the contract(database user or role) message_type_name Name of a message type to be included as part of the contract.



Leave a Reply 0

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