MergePullSubscription Constructor (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.

Namespace:   Microsoft.SqlServer.Replication
Assembly:  Microsoft.SqlServer.Rmo (in Microsoft.SqlServer.Rmo.dll)

public MergePullSubscription(
	string subscriptionDBName,
	string publisherName,
	string publicationDBName,
	string publicationName,
	ServerConnection subscriberConnectionContext,
	bool createMergeAgentByDefault
)

Parameters

subscriptionDBName
Type: System.String

A String value that specifies the name of the subscription database.

publisherName
Type: System.String

A String value that specifies the name of the Publisher.

publicationDBName
Type: System.String

A String value that specifies the name of the publication database.

publicationName
Type: System.String

A String value that specifies the name of the publication.

subscriberConnectionContext
Type: Microsoft.SqlServer.Management.Common.ServerConnection

A ServerConnection object that specifies the connection context required to establish a connection to the instance of Microsoft SQL Server that is the Subscriber.

createMergeAgentByDefault
Type: 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 How to: Synchronize a Pull Subscription (RMO Programming).

Return to top
Show: