MergeSynchronizationAgent Class
Provides the functionality of the Replication Merge Agent.
Assembly: Microsoft.SqlServer.Replication (in Microsoft.SqlServer.Replication.dll)
System::MarshalByRefObject
Microsoft.SqlServer.Replication::MergeSynchronizationAgent
| Name | Description | |
|---|---|---|
![]() | MergeSynchronizationAgent() | Creates an instance of the MergeSynchronizationAgent class. |
| Name | Description | |
|---|---|---|
![]() | AlternateSynchronizationPartnerCollection | Gets the alternate synchronization partners for a subscription. |
![]() | AltSnapshotFolder | Gets or sets the alternate snapshot folder for the subscription. |
![]() | ComErrorCollection | Gets a collection of errors generated by the replication agent. |
![]() | Distributor | Gets or sets the name of the instance of Microsoft SQL Server that is acting as the Distributor for the subscription. |
![]() | DistributorAddress | Gets or sets the network address that is used to connect to the Distributor when the DistributorNetwork property is specified. |
![]() | DistributorEncryptedPassword | This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the distributor encrypted password. |
![]() | DistributorLogin | Gets or sets the login name that is used when connecting to the Distributor using SQL Server Authentication. |
![]() | DistributorNetwork | Gets or sets the client Net-Library that is used when connecting to the Distributor. |
![]() | DistributorPassword | Sets the password that is used when connecting to the Distributor using SQL Server Authentication. |
![]() | DistributorSecurityMode | Gets or sets the security mode used when connecting to the Distributor. |
![]() | DownloadGenerationsPerBatch | Gets or sets the number of generations to be processed in a single batch while downloading changes from the Publisher to the Subscriber. A generation is defined as a logical group of changes per article. |
![]() | DynamicSnapshotLocation | Gets or sets the location of the partitioned snapshot for this Subscriber. |
![]() | ExchangeType | Gets or sets how data is exchanged during synchronization. |
![]() | FileTransferType | Gets or sets how the initial snapshot files are transferred to the Subscriber. |
![]() | HostName | Gets or sets the value used by the Merge Agent when it evaluates a parameterized filter that uses the HOST_NAME function. |
![]() | InputMessageFile | This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the input message file. |
![]() | InternetLogin | Gets or sets the login name that is used with Web synchronization when connecting to the Publisher by using Internet authentication. |
![]() | InternetPassword | Sets the password for the InternetLogin property that is used with Web synchronization when connecting to the Publisher by using Internet authentication. |
![]() | InternetProxyLogin | Gets or sets the login name that is used with Web synchronization when connecting to the Web server by using an Internet proxy server. |
![]() | InternetProxyPassword | Sets the password for the login that is used with Web synchronization when connecting to the Web server by using an Internet proxy server. |
![]() | InternetProxyServer | Gets or sets the name of the Internet proxy server that is used with Web synchronization when connecting to the Web server. |
![]() | InternetSecurityMode | Gets or sets the HTTP authentication method that is used when connecting to the Web server during Web synchronization. |
![]() | InternetTimeout | Gets or sets the HTTP time-out when connecting to the Web server. |
![]() | InternetUrl | Gets or sets the URL of the Web service that is configured for Web synchronization. |
![]() | LastUpdatedTime | Gets the timestamp of the last time that replication agent synchronized the subscription. |
![]() | LoginTimeout | Gets or sets the maximum number of seconds to wait for connections to be established. |
![]() | MetadataRetentionCleanup | Get or sets whether to clean up metadata. |
![]() | Output | Gets or sets the agent output file. |
![]() | OutputMessageFile | This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the input message file. |
![]() | OutputVerboseLevel | Gets or sets the level of detail of information that is written to the agent output file. |
![]() | ProfileName | Gets or sets the name of the profile that is used by the agent. |
![]() | Publication | Gets or sets the name of the publication. |
![]() | Publisher | Gets or sets the name of the instance of Microsoft SQL Server that is the Publisher for the subscription. |
![]() | PublisherAddress | Gets or sets the network address that is used to connect to the Publisher when the PublisherNetwork property is specified. |
![]() | PublisherChanges | Gets the total number of Publisher changes that were applied at the Subscriber during the last synchronization. |
![]() | PublisherConflicts | Gets the total number of conflicts that occurred at the Publisher during the last synchronization. |
![]() | PublisherDatabase | Gets or sets the name of the publication database. |
![]() | PublisherEncryptedPassword | This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the publisher encrypted password. |
![]() | PublisherFailoverPartner | Gets or sets the failover partner instance of SQL Server that is participating in a database mirroring session with the publication database. |
![]() | PublisherLogin | Gets or sets the login name that is used when connecting to the Publisher by using SQL Server Authentication. |
![]() | PublisherNetwork | Gets or sets the client Net-Library that is used when connecting to the Publisher. |
![]() | PublisherPassword | Sets the password that is used when connecting to the Publisher by using SQL Server Authentication. |
![]() | PublisherSecurityMode | Gets or sets the security mode that is used when connecting to the Publisher. |
![]() | QueryTimeout | Gets or sets the number of seconds that are allowed for internal queries to finish. |
![]() | SecureDistributorEncryptedPassword | This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the secure distributor encrypted password. |
![]() | SecurePublisherEncryptedPassword | This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the secure publisher encrypted password. |
![]() | SecureSubscriberEncryptedPassword | This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the secure subscriber encrypted password. |
![]() | Subscriber | Gets or sets the name of the instance of Microsoft SQL Server that is the Subscriber. |
![]() | SubscriberChanges | Gets the total number of Subscriber changes that were applied at the Publisher during the last synchronization. |
![]() | SubscriberConflicts | Gets the total number of conflicts that occurred at the Publisher during the last synchronization. |
![]() | SubscriberDatabase | Gets or sets the name of the subscription database. |
![]() | SubscriberDatabasePath | This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the subscriber database path. |
![]() | SubscriberDataSourceType | Gets or sets the type of data source that is used as the Subscriber. |
![]() | SubscriberEncryptedPassword | This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the subscriber encrypted password. |
![]() | SubscriberLogin | Gets or sets the login name used that is when connecting to the Subscriber by using SQL Server Authentication. |
![]() | SubscriberPassword | Sets the password that is used when connecting to the Subscriber by using SQL Server Authentication. |
![]() | SubscriberSecurityMode | Gets or sets the security mode used when connecting to the Subscriber. |
![]() | SubscriptionType | Gets or sets whether the subscription is a push or pull subscription. |
![]() | SyncToAlternate | Gets or sets whether the synchronization is to an alternate synchronization partner. |
![]() | UploadGenerationsPerBatch | Gets or sets the number of generations to be processed in a single batch while uploading changes from the Subscriber to the Publisher. A generation is defined as a logical group of changes per article. |
![]() | UseInteractiveResolver | Gets or sets whether the interactive resolver is used during reconciliation. |
![]() | UseWebSynchronization | Gets or sets whether Web synchronization is used. |
![]() | Validate | Gets or sets whether data validation is performed on the Subscriber data at the end of the synchronization. |
![]() | WorkingDirectory | Gets or sets the working directory from which snapshot files are accessed when FTP is used. |
| Name | Description | |
|---|---|---|
![]() | Abort() | This API supports the product infrastructure and is not intended to be used directly from your code. Aborts the synchronization. |
![]() | ClearAllTraceFlags() | This API supports the product infrastructure and is not intended to be used directly from your code. Clears all the trace flags used by the synchronization agent. |
![]() | ClearTraceFlag(Int32) | This API supports the product infrastructure and is not intended to be used directly from your code. Clears a trace flag. |
![]() | CreateObjRef(Type^) | (Inherited from MarshalByRefObject.) |
![]() | Dispose() | This API supports the product infrastructure and is not intended to be used directly from your code. Releases the unmanaged resources that are used by MergeSynchronizationAgent. |
![]() | Dispose(Boolean) | This API supports the product infrastructure and is not intended to be used directly from your code. Releases the unmanaged resources that are used by MergeSynchronizationAgent. |
![]() | EnableTraceFlag(Int32) | This API supports the product infrastructure and is not intended to be used directly from your code. Enables the flag tracing. |
![]() | Equals(Object^) | (Inherited from Object.) |
![]() | Finalize() | This API supports the product infrastructure and is not intended to be used directly from your code. Finalizes the agent.(Overrides Object::Finalize().) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetLifetimeService() | (Inherited from MarshalByRefObject.) |
![]() | GetType() | (Inherited from Object.) |
![]() | InitializeLifetimeService() | (Inherited from MarshalByRefObject.) |
![]() | IsSnapshotRequired() | Connects to the Publisher or Distributor and the Subscriber to determine whether a new snapshot will be applied during the next agent synchronization. |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | MemberwiseClone(Boolean) | (Inherited from MarshalByRefObject.) |
![]() | ProcessMessagesAtPublisher() | This API supports the product infrastructure and is not intended to be used directly from your code. Processes the messages at publisher. |
![]() | ProcessMessagesAtSubscriber() | This API supports the product infrastructure and is not intended to be used directly from your code. Processes the messages at subscriber. |
![]() | Synchronize() | Starts the Merge Agent to synchronize the subscription. |
![]() | ToString() | (Inherited from Object.) |
The MergeSynchronizationAgent class supports the ability to do the following replication tasks:
Synchronize subscriptions.
Specify whether only the upload phase, only the download phase, or both phases are run during synchronization.
Validate that a subscription has the expected data.
Specify a different snapshot folder, from which the initial snapshot for a subscription can be applied.
In the following example, the Synchronize method is called on the instance of the MergeSynchronizationAgent class that is accessed from the SynchronizationAgent property to synchronize the push subscription.
In the following example, an instance of the MergeSynchronizationAgent class is used to synchronize a merge subscription. Because the pull subscription was created by using a value of false for CreateSyncAgentByDefault, additional properties must be supplied.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Microsoft.SqlServer.Replication Namespace
How to: Synchronize a Pull Subscription (RMO Programming)
How to: Synchronize a Push Subscription (RMO Programming)
Replication Merge Agent



