Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

650


Part V: Enterprise Data Management


CREATE SERVICE InitiatorService
ON QUEUE [dbo].[InitiatorQueue];
GO

CREATE SERVICE TargetService
ON QUEUE [dbo].[TargetQueue]
(HelloWorldContract);
GO

After the Service Broker objects are created, you can see them listed under the Object
Explorer Service Broker node, as shown in Figure 25-2.

FIGURE 25-2
After the objects are created, they can be seen in Object Explorer.

Additionally, you can query the Service Broker Catalog Views to list all Service Broker
objects created as follows:

USE AdventureWorks2012
GO

--Query the sys.service_message_type catalog view
SELECT * FROM sys.service_message_types

c25.indd 650c25.indd 650 7/31/2012 9:21:37 AM7/31/2012 9:21:37 AM


http://www.it-ebooks.info
Free download pdf