다음을 통해 공유


DeliveryChannel.ProtocolName Property

Gets or sets the name of the delivery protocol associated with the delivery channel.

네임스페이스: Microsoft.SqlServer.Management.Nmo
어셈블리: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

구문

‘선언
Public Property ProtocolName As String
public string ProtocolName { get; set; }
public:
property String^ ProtocolName {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_ProtocolName ()

/** @property */
public void set_ProtocolName (String value)
public function get ProtocolName () : String

public function set ProtocolName (value : String)

속성 값

A String of up to 64 characters containing the name of a standard or custom delivery protocol.

주의

The ProtocolName property links the delivery channel to a delivery protocol. The property value can be SMTP, File, or the name of a custom delivery protocol defined in using a ProtocolDefinition object.

Each delivery protocol can be associated with one or more delivery channels. The name of the specific delivery channel used to deliver a notification is defined in subscriber device records.

The following examples show how to define a delivery channel for the standard file delivery protocol:

// Define a delivery channel that uses the built-in File protocol
DeliveryChannel fileChannel = 
    new DeliveryChannel(myInstance, "FileChannel");
fileChannel.ProtocolName = "File";

// Define and add arguments for the file delivery channel
DeliveryChannelArgument fileNameArg = 
    new DeliveryChannelArgument(fileChannel, "FileName");
fileNameArg.Value = sampleDirectory + 
    @"\Notifications\FileNotifications.txt";
fileChannel.DeliveryChannelArguments.Add(fileNameArg);

// Add the file delivery channel to the instance
myInstance.DeliveryChannels.Add(fileChannel);
' Define a delivery channel using the built-in File protocol
Dim fileChannel As DeliveryChannel = _
    New DeliveryChannel(myInstance, "FileChannel")
fileChannel.ProtocolName = "File"

' Define and add arguments for the file delivery channel
Dim fileNameArg As DeliveryChannelArgument = _
    New DeliveryChannelArgument(fileChannel, "FileName")
fileNameArg.Value = sampleDirectory + _
    "\Notifications\FileNotifications.txt"
fileChannel.DeliveryChannelArguments.Add(fileNameArg)

' Add the file delivery channel to the instance
myInstance.DeliveryChannels.Add(fileChannel)

스레드 보안

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

DeliveryChannel Class
DeliveryChannel Members
Microsoft.SqlServer.Management.Nmo Namespace

관련 자료

배달 채널 정의
ProtocolName Element for DeliveryChannel (ICF)