Show TOC

Message Types (SQL Server)Locate this document in the navigation structure

Message types define the type of data that a message can contain. You create identical message types in each database that participates in a conversation.

Message types specify the type of XML validation that SQL Server performs for messages of that type. For arbitrary or binary data, the message type can specify that SQL Server performs no validation. PowerDesigner models message types as extended objects with a stereotype of <<MessageType>>.

Creating a Message Type

You can create a message type in any of the following ways:

  • Select Start of the navigation path Model Next navigation step Message Types End of the navigation path to access the List of Message Types, and click the Add a Row tool.

  • Right-click the model (or a package) in the Browser, and select Start of the navigation path New Next navigation step Message Type End of the navigation path.

Message Type Properties

You can modify an object's properties from its property sheet. To open a message type 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 message type. 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 message type belongs to the current user.

Scripting name: Owner

Validation

Specifies how the Service Broker validates the message body for messages of this type. You can choose between:

  • none [default] – no validation performed

  • empty – message must contain no data

  • well_formed_xml – message must contain well-formed XML

  • valid_xml with schema collection – message must conform to the specified XML schema

Scripting name: Validation

Schema

Specifies the name of the schema to be used for validating the message contents.

Scripting name: SchemaCollectionName