Compartilhar via


Specifying the Delivery Protocol Name and Fields

Each notification class can use one or more delivery protocols for notification delivery. In the application definition, you must configure each delivery protocol that a notification class supports. Notification Services uses this information to determine which delivery protocols are valid for a set of notifications. This topic explains how to define delivery protocols.

Defining a Delivery Protocol

When you define a delivery protocol, you must provide the protocol name. If the delivery protocol requires additional information, you also define fields that supply this information.

In addition, Notification Services supports several execution settings for delivery protocols, which allow you to configure delivery retry, failure, and timeout handling. For more information, see Specifying Delivery Protocol Execution Settings.

To define a delivery protocol

Delivery Protocol Name

Each delivery protocol has a predefined name. The names of the standard delivery protocols are SMTP and File. The names of custom delivery protocols are documented in the instance configuration. The name that you provide in the notification class must match the name given to the delivery protocol.

To define the protocol name
  • If you are defining an application through XML, define the protocol name in the ProtocolName Element (ADF).
  • If you are defining an application programmatically, use the Name property of the NotificationClassProtocol object (NMO).

Protocol Fields

Some delivery protocols require configuration data. For example, a message sent using SMTP must provide Subject, From, and To data. You define the field names and values for configuration data when you define delivery protocols for a notification class.

  • The field name is simply the name of the configuration field. If the protocol requires a Subject value, for example, the field name is Subject.
  • The field value is either the name of a notification field that contains the required value or a Transact-SQL expression that computes the value. You can use any Transact-SQL expression that can be evaluated as part of a SELECT statement. As with all Transact-SQL strings, enclose a string in single quotation marks. If the string is Unicode, add an N before the first quotation mark, for example, N'myString'.

For example, if you need to provide Subject, From, and To fields, you can define the following fields for the delivery protocol:

Field name Transact-SQL expression Notification field

Subject

 

Headline

From

'someone@example.com'

 

To

DeviceAddress

 

The Subject is the value of a notification field named Headline. The From value is a Transact-SQL expression that is a string constant enclosed in single quotes. The To value is a reference to a built-in field that contains the subscriber's e-mail address.

Note

If you are defining an application in an XML file, you must replace reserved XML characters, such as '<', with their entity references. For more information, see XML Reserved Characters.

When the distributor passes notification data to the delivery protocol it includes the values of all defined protocol fields.

To define protocol fields

See Also

Concepts

Notification Distribution
Specifying Delivery Protocol Execution Settings

Other Resources

Configuring Delivery Protocols
Defining Notification Classes
Defining Notification Services Applications

Help and Information

Getting SQL Server 2005 Assistance