Chapter 15 DBMS-Specific Features
Contracts define the message types used in a Service Broker conversation and also determine which side of the conversation can send messages of that type. Each conversation follows a contract. The initiating service specifies the contract for the conversation when the conversation begins. The target service specifies the contracts that the target service accepts conversations for.
You create an identical contract in each database that participates in a conversation.
You can create a contract in any of the following ways:
You can modify an object's properties from its property sheet. To open a contract property sheet, double-click its Browser entry.
The following extended attributes are available on the Microsoft tab:
Name | Description |
---|---|
Authorization | Specifies a database user or role as the owner of the contract. If the current user is dbo or sa, this may be the name of any valid user or role. Otherwise, it must be the name of the current user, a user that the current user has IMPERSONATE permission for, or a role to which the current user belongs. By default, the contract belongs to the current user.
Scripting name: Owner |
The MessageTypes tab lists the message types included in the contract via intermediary "message contract" objects. You can reuse an existing message contract or create a new one, using the tools on this tab.
Once you have added or created a message contract, double-click its entry to open its property sheet.
The following extended attributes are available on the Microsoft tab:
Name | Description |
---|---|
Sent by | Specifies which endpoint can send a message of the indicated message type. Contracts document the messages that services can use to have specific conversations. Each conversation has two endpoints: the initiator endpoint, the service that started the conversation, and the target endpoint, the service that the initiator is contacting.
Scripting name: Sender |
Message type | Specifies the message type of the contract.
Scripting name: MessageType |
Copyright (C) 2007. Sybase Inc. All rights reserved. |
![]() |