MergePullSubscription 构造函数 (String, String, String, String, ServerConnection, Boolean)

Creates a new instance of the MergePullSubscription class with the specified database, Publisher, publication, Subscriber connection, and whether the agent job is created.

命名空间:  Microsoft.SqlServer.Replication
程序集:  Microsoft.SqlServer.Rmo(在 Microsoft.SqlServer.Rmo.dll 中)

语法

声明
Public Sub New ( _
    subscriptionDBName As String, _
    publisherName As String, _
    publicationDBName As String, _
    publicationName As String, _
    subscriberConnectionContext As ServerConnection, _
    createMergeAgentByDefault As Boolean _
)
用法
Dim subscriptionDBName As String 
Dim publisherName As String 
Dim publicationDBName As String 
Dim publicationName As String 
Dim subscriberConnectionContext As ServerConnection 
Dim createMergeAgentByDefault As Boolean 

Dim instance As New MergePullSubscription(subscriptionDBName, _
    publisherName, publicationDBName, _
    publicationName, subscriberConnectionContext, _
    createMergeAgentByDefault)
public MergePullSubscription(
    string subscriptionDBName,
    string publisherName,
    string publicationDBName,
    string publicationName,
    ServerConnection subscriberConnectionContext,
    bool createMergeAgentByDefault
)
public:
MergePullSubscription(
    String^ subscriptionDBName, 
    String^ publisherName, 
    String^ publicationDBName, 
    String^ publicationName, 
    ServerConnection^ subscriberConnectionContext, 
    bool createMergeAgentByDefault
)
new : 
        subscriptionDBName:string * 
        publisherName:string * 
        publicationDBName:string * 
        publicationName:string * 
        subscriberConnectionContext:ServerConnection * 
        createMergeAgentByDefault:bool -> MergePullSubscription
public function MergePullSubscription(
    subscriptionDBName : String, 
    publisherName : String, 
    publicationDBName : String, 
    publicationName : String, 
    subscriberConnectionContext : ServerConnection, 
    createMergeAgentByDefault : boolean
)

参数

  • subscriptionDBName
    类型:System.String
    A String value that specifies the name of the subscription database.
  • publisherName
    类型:System.String
    A String value that specifies the name of the Publisher.
  • publicationDBName
    类型:System.String
    A String value that specifies the name of the publication database.
  • publicationName
    类型:System.String
    A String value that specifies the name of the publication.
  • createMergeAgentByDefault
    类型:System.Boolean
    Specifies whether or not the agent job for the subscription is created when the subscription is created.

注释

Specify a value of true for createMergeAgentByDefault when you need to schedule synchronization, or when you need to synchronize the subscription from SQL Server Management Studio. Specify a value of false if the Replication Agent will always be started programmatically without using SQL Server Agent.

When you specify a value of false for createMergeAgentByDefault, the MergeSynchronizationAgent or TransSynchronizationAgent objects obtained from the SynchronizationAgent property will not have enough information to successfully synchronize the subscription. For more information, see 如何同步请求订阅(RMO 编程).

请参阅

参考

MergePullSubscription 类

MergePullSubscription 重载

Microsoft.SqlServer.Replication 命名空间