Defining a File Delivery Channel
A File delivery channel defines a text file endpoint for delivering notifications using the File delivery protocol. If you use the built-in File delivery protocol in an application hosted by the instance, you must define at least one File delivery channel.
File Delivery Channel Properties
When you define a delivery channel for the File delivery protocol, you must use the correct protocol name and arguments. The following list describes the elements and values required by the File delivery protocol:
- The delivery channel name must be unique within the Notification Services instance and cannot contain the following characters: open bracket ([), close bracket (]), quotation mark ("), single quote ('), backslash (\), and forward slash (/).
- The protocol name must be File.
- The File delivery protocol uses two arguments:
- You must specify the file for the delivery channel. The file argument must have the name FileName, and the value must be the full path and name of the text file that you want the delivery protocol to create.
- You can specify an encoding for the file. The encoding argument must have the name Encoding, and the value must be a valid encoding format. All encoding formats returned by the GetEncoding method of the Encoding class in the Microsoft .NET Framework are valid. If this argument is not specified, the delivery protocol uses UTF-8 encoding.
Example
The following example shows how to define a File delivery channel in an instance configuration file (ICF). Because the File delivery protocol is built-in, it does not need a corresponding item in the Protocols element of the ICF.
<DeliveryChannels>
<DeliveryChannel>
<DeliveryChannelName>FileChannel01</DeliveryChannelName>
<ProtocolName>File</ProtocolName>
<Arguments>
<Argument>
<Name>FileName</Name>
<Value>C:\Results\StockNotification.txt</Value>
</Argument>
</Arguments>
</DeliveryChannel>
</DeliveryChannels>
See Also
Reference
Microsoft.SqlServer.Management.Nmo.DeliveryChannel
Microsoft.SqlServer.Management.Nmo.DeliveryChannelArgument
Concepts
File Delivery Protocol
Defining Delivery Channels
Other Resources
Instance Configuration File Templates
Configuring Instances of Notification Services
DeliveryChannels Element (ICF)