Message Schemas for Query Notification

The Microsoft BizTalk Adapter for SQL Server surfaces the Notification operation to receive query notifications from the SQL Server database.

You configure the Notification operation by setting binding properties in the SQL adapter. For more information about the Notification-related binding properties, see Read about the BizTalk Adapter for SQL Server adapter binding properties. You set the NotificationStatement binding property to specify a SQL statement (SELECT or EXEC <stored procedure>) for the query notification. The result set of this query is returned as strongly-typed data to your code in the Notification operation.

Message Structure for the Notification operation

The following table shows the XML message structure for the Notification operation.

Operation: Notification

XML message:

<?xml version="1.0" encoding="utf-8" ?>
  <Notification xmlns="http://schemas.microsoft.com/Sql/2008/05/Notification">
    <Info>Value</Info>
    <Source>Value</Source>
    <Type>Value</Type>
 </Notification>

Description: This is the inbound message that is sent by the SQL Server to the adapter clients. In the message:

  • The <Info> tag indicates the reason for the notification. For example, an “insert” value in this tag indicates that data has been inserted in one or more of the tables referenced in the notification statement.
  • The <Source> tag indicates the source for the notification. For example, a “data” value in this tag indicates a change in the data in a referenced object. Similarly, an “object” value in this tag indicates a change in a referenced object.
  • The <Type> tag indicates the type of data change. Query notification messages are of two types: change and subscribe. A “change” value in the <Type> tag indicates that the results of the query have changed, whereas a “subscribe” value in the <Type> tag indicates that a subscription request failed.

Message Action for the Notification Operation

The message action for the notification operation is “Notification.”