Export (0) Print
Expand All

Replication Merge Agent Utility

SQL Server 2000

The Replication Merge Agent utility configures and begins the Merge Agent, which applies the initial snapshot held in the database tables to the Subscribers. It also merges incremental data changes that occurred at the Publisher after the initial snapshot was created, and reconciles conflicts either according to the rules you configure or using a custom resolver you create.

Syntax

replmerg [-?]
-Publisher server_name[\instance_name]
-PublisherDB publisher_database
-Publication publication
-Subscriber server_name[\instance_name]
-SubscriberDB subscriber_database
[-AltSnapshotFolder alt_snapshot_folder_path]
[-Continuous]
[-DefinitionFile def_path_and_file_name]
[-DestThreads number_of_destination_threads]
[-Distributor server_name[\instance_name]]
[-DistributorAddress distributor_address]
[-DistributorLogin distributor_login]
[-DistributorNetwork distributor_network]
[-DistributorPassword distributor_password]
[-DistributorSecurityMode [0|1]]
[-DownloadGenerationsPerBatch download_generations_per_batch]
[-DownloadReadChangesPerBatch download_read_changes_per_batch]
[-DownloadWriteChangesPerBatch download_write_changes_per_batch]
[-DynamicSnapshotLocation dynamic_snapshot_location]
[-ExchangeType [1|2|3]]
[-FastRowCount [0|1]]
[-FileTransferType [0|1]]
[-ForceConvergenceLevel [0|1|2 (Publisher|Subscriber|Both)]]
[-FtpAddress ftp_address]
[-FtpPassword ftp_password]
[-FtpPort ftp_port]
[-FtpUserName ftp_user_name]
[-HistoryVerboseLevel [1|2|3]]
[-Hostname host_name]
[-InteractiveResolution [0|1]]
[-KeepAliveMessageInterval keep_alive_message_interval_seconds]
[-LoginTimeOut login_time_out_seconds]
[-MaxBcpThreads number_of_threads]
[-MaxDownloadChanges number_of_download_changes]
[-MaxUploadChanges number_of_upload_changes]
[-MetadataRetentionCleanup [0|1]]
[-Output]
[-OutputVerboseLevel [0|1|2]]
[-PollingInterval polling_interval]
[-ProfileName profile_name]
[-PublisherAddress publisher_address]
[-PublisherLogin publisher_login]
[-PublisherNetwork publisher_network]
[-PublisherPassword publisher_password]
[-PublisherSecurityMode [0|1]]
[-QueryTimeOut query_time_out_seconds]
[-SrcThreads number_of_source_threads]
[-StartQueueTimeout start_queue_timeout_seconds]
[-SubscriberDatabasePath subscriber_path]
[-SubscriberDBAddOption [0|1|2|3]]
[-SubscriberLogin subscriber_login]
[-SubscriberPassword subscriber_password
[-SubscriberSecurityMode [0|1]]
[-SubscriberType [0|1|2|3|4|5|6|7|8]]
[-SubscriptionType [0|1|2]]
[-SyncToAlternate [0|1]
[-UploadGenerationsPerBatch upload_generations_per_batch]
[-UploadReadChangesPerBatch upload_read_changes_per_batch]
[-UploadWriteChangesPerBatch upload_write_changes_per_batch]
[-UseInprocLoader]
[-Validate [0|1|2|3]]
[-ValidateInterval validate_interval]

Note  Parameters can be specified in any order. When optional parameters are not specified, values from predefined registry settings on the local computer are used.

Arguments

-?

Prints all available parameters.

-Publisher server_name[\instance_name]

Is the name of the Publisher. Specify server_name for the default instance of Microsoft® SQL Server™ 2000 on that server. Specify server_name\instance_name for a named instance of SQL Server 2000 on that server.

-PublisherDB publisher_database

Is the name of the Publisher database.

-Publication publication

Is the name of the publication. This parameter is only valid if the publication is set to always have a snapshot available for new or reinitialized subscriptions.

-Subscriber server_name[\instance_name]

Is the name of the Subscriber. Specify server_name for the default instance of SQL Server 2000 on that server. Specify server_name\instance_name for a named instance of SQL Server 2000 on that server.

-SubscriberDB subscriber_database

Is the name of the Subscriber database.

-AltSnapshotFolder alt_snapshot_folder_path

Is the path to the folder that contains the initial snapshot for a subscription.

-Continuous

Specifies whether the agent attempts to poll replicated transactions continually. If specified, the agent polls replicated transactions from the source at polling intervals, even if there are no transactions pending.

-DestThreads number_of_destination_threads

Specifies the number of destination threads that the Merge Agent uses to apply changes at the destination. The destination is the Publisher during upload and the Subscriber during download. The default is 4.

-DefinitionFile def_path_and_file_name

Is the path of the agent definition file. An agent definition file contains command prompt arguments for the agent. The content of the file is parsed as an executable file. Use double quotation marks (") to specify argument values containing arbitrary characters.

-Distributor server_name[\instance_name]

Is the Distributor name. Specify server_name for the default instance of SQL Server 2000 on that server. Specify server_name\instance_name for a named instance of SQL Server 2000 on that server. For Distributor (push) distribution, the name defaults to the name of the default instance of SQL Server on the local computer.

-DistributorAddress distributor_address

Is the network connection string for the Net-Library defined in the DistributorNetwork option. If the DistributorNetwork option is the TCP/IP Sockets Net-Library, then the connection string is in the form of:

'address,socket'

For more information about the format, see Network Protocols. This option is useful for configuring connections across the Internet.

-DistributorLogin distributor_login

Is the Distributor login name.

-DistributorNetwork distributor_network

Is the Net-Library (without the .dll extension) to use when connecting to the Distributor. This option is useful when configuring the Merge Agent to connect to a Distributor over the Internet.

-DistributorPassword distributor_password

Is the Distributor password.

-DistributorSecurityMode [0|1]

Specifies the security mode of the Distributor. A value of 0 indicates SQL Server Authentication Mode (default), and a value of 1 indicates Windows Authentication Mode.

-DownloadGenerationsPerBatch download_generations_per_batch

Is 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. The default for a reliable communication link is 100. The default for an unreliable communication link is 10.

-DownloadReadChangesPerBatch download_read_changes_per_batch

Is the number of changes to be read in a single batch while downloading changes from the Publisher to the Subscriber. The default is 100.

-DownloadWriteChangesPerBatch download_write_changes_per_batch

Is the number of changes to be applied in a single batch while downloading changes from the Publisher to the Subscriber. The default is 100.

-DynamicSnapshotLocation dynamic_snapshot_location

Is the location of the dynamic snapshot.

-ExchangeType [1|2|3]

Specifies the type of exchange. A value of 1 indicates that the agent should upload data changes from the Subscriber to the Publisher. A value of 2 indicates that the agent should download data changes from the Publisher to the Subscriber. A value of 3, the default, indicates that the agent should first upload data changes from the Subscriber to the Publisher and then download data changes from the Publisher to the Subscriber.

-FastRowCount [0|1]

Specifies what type of rowcount calculation method should be used for rowcount validation. A value of 1 (default) indicates the fast method. A value of 0 indicates the full rowcount method.

-FileTransferType [0|1]

Specifies the file transfer type. A value of 0 indicates UNC (universal naming convention), and a value of 1 indicates FTP (file transfer protocol).

-ForceConvergenceLevel [0|1|2 (Publisher|Subscriber|Both)]

Specifies the level of convergence the Merge Agent should use. The default is 0.

ForceConvergenceLevel value
Description
0 Default. Perform a standard merge without additional convergence.
1 Force convergence for all generations.
2 Force convergence for all generations and correct corrupt lineages. When specifying this value, specify where lineages should be corrected: the Publisher, the Subscriber, or both the Publisher and the Subscriber.

-FtpAddress ftp_address

Is the network address of the FTP service for the Distributor. When not specified, DistributorAddress is used. If the DistributorAddress is not specified, Distributor is used.

-FtpPassword ftp_password

Is the user password used to connect to the FTP service.

-FtpPort ftp_port

Is the port number of the FTP service for the Distributor. When not specified, the default port number for FTP service (21) is used.

-FtpUserName ftp_user_name

Is the user name used to connect to the FTP service. When not specified, anonymous is used.

-HistoryVerboseLevel [1|2|3]

Specifies the amount of history logged during a merge operation. You can minimize the effect of history logging on performance by selecting 1.

HistoryVerboseLevel value
Description
1 Always update a previous history message of the same status (startup, progress, success, and so on). If no previous record with the same status exists, insert a new record.
2 Default. Insert new history records unless the record is for such things as idle messages or long-running job messages. In those instances, update the previous records.
3 Always insert new records, unless it is for idle messages.

-Hostname host_name

Is the network name of the local computer. The default is the local computer name.

-LoginTimeOut login_time_out_seconds

Is the number of seconds before the login times out. The default is 15 seconds.

-MaxBcpThreads number_of_threads

Specifies the number of bulk copy operations that can be performed in parallel. The maximum number of threads and ODBC connections that exist simultaneously is the lesser of MaxBcpThreads or the number of bulk copy requests that appear in the system table sysmergeschemachange in the publication database. MaxBcpThreads must have a value greater than 0 and has no hard-coded upper limit. The default is 1.

-MaxDownloadChanges number_of_download_changes

Specifies the maximum number of changed rows that should be downloaded from the Publisher to the Subscriber. The number of rows downloaded may be higher than the specified maximum because: complete generations are processed; and parallel destination threads may run, each of which processes at least 100 changes in its first pass. By default all changes that are ready to be downloaded are sent.

-MaxUploadChanges number_of_upload_changes

Specifies the maximum number of changed rows that should be uploaded from the Subscriber to the Publisher. The number of rows uploaded may be higher than the specified maximum because: complete generations are processed; and parallel destination threads may run, each of which processes at least 100 changes in its first pass. By default all changes that are ready to be uploaded are sent.

-MetadataRetentionCleanup [0|1]

Requires Service Pack 1 or later. MetadataRetentionCleanup specifies if meta data from MSmerge_genhistory, MSmerge_contents and MSmerge_tombstone should be cleaned up based on the publication retention period. For Service Pack 1 and later, the default is 1, indicating that cleanup should occur. A value of 0 indicates that cleanup should not occur automatically. For more information on meta data cleanup, see How Merge Replication Works.

-Output output_path_and_file_name

Is the path of the agent output file. If the file name is not provided, the output is sent to the console. If the specified file name exists, the output is appended to the file.

-OutputVerboseLevel [0|1|2]

Specifies whether the output should be verbose. If the verbose level is 0, only error messages are printed. If the verbose level is 1, all of the progress report messages are printed. If the verbose level is 2 (default), all error messages and progress report messages are printed, which is useful for debugging.

-PollingInterval polling_interval

Is how often, in seconds, the Publisher or Subscriber is queried for data changes. The default is 60 seconds.

-ProfileName profile_name

Specifies an agent profile to use for agent parameters. If ProfileName is NULL, the agent profile is disabled. If ProfileName is not specified, the default profile for the agent type is used.

-PublisherAddress publisher_address

Is the network connection string for the Net-Library defined in the PublisherNetwork option. If the PublisherNetwork option is the TCP/IP Sockets Net-Library, the connection string is in the form of:

'address,socket'

For more information about the format, see Network Protocols. This option is useful for configuring connections across the Internet.

-PublisherLogin publisher_login

Is the Publisher login name. If PublisherSecurityMode is 0 (for SQL Server Authentication), this parameter must be specified.

-PublisherNetwork publisher_network

Is the Net-Library (without the .dll extension) to use when connecting to the Publisher. This option is useful when configuring the Merge Agent to connect to a Publisher over the Internet.

-PublisherPassword publisher_password

Is the Publisher password. If PublisherSecurityMode is 0 (for SQL Server Authentication), this parameter must be specified.

-PublisherSecurityMode [0|1]

Specifies the security mode of the Publisher. A value of 0 indicates SQL Server Authentication (default), and a value of 1 indicates Windows Authentication Mode.

-QueryTimeOut query_time_out_seconds

Is the number of seconds before the query times out. The default is 300 seconds.

-SrcThreads number_of_source_threads

Specifies the number of source threads that the Merge Agent uses to enumerate changes from the source. The source is the Subscriber during upload and the Publisher during download. The default is 3.

-StartQueueTimeout start_queue_timeout_seconds

Is the maximum number of seconds that the Merge Agent waits when the number of concurrent merge processes running is at the limit set by the @max_concurrent_merge property of sp_addmergepublication. If the maximum number of seconds is reached and the Merge Agent is still waiting, it will exit. A value of 0 means that the agent waits indefinitely, although it can be cancelled.

-SubscriberDatabasePath subscriber_database_path

Is the path to the Jet database (.mdb file) if SubscriberType is 2 (allows a connection to a Jet database without an ODBC Data Source Name (DSN)).

-SubscriberDBAddOption [0|1|2|3]

Specifies whether there is an existing Subscriber database.

SubscriberDBAddOption value
Description
0 Use the existing database (default).
1 Create a new, empty Subscriber database.
2 Create a new database and attach it to the specified file.
3 Create a new database, attach the database, and enable all subscriptions that might exist at the file.

Note  When you use values 2 and 3, the database path for the Subscriber must be specified in the SubscriberDatabasePath option.

SubscriberLogin subscriber_login

Is the Subscriber login name. If SubscriberSecurityMode is 0 (for SQL Server Authentication), this parameter must be specified.

-SubscriberPassword subscriber_password

Is the Subscriber password. If SubscriberSecurityMode is 0 (for SQL Server Authentication), this parameter must be specified.

-SubscriberSecurityMode [0|1]

Specifies the security mode of the Subscriber. A value of 0 indicates SQL Server Authentication (default), and a value of 1 indicates Windows Authentication Mode.

-SubscriberType [0|1|2|3|4|5|6|7|8]

Specifies the type of Subscriber connection used by the Merge Agent.

SubscriberType value Description
0 Microsoft SQL Server
1 ODBC data source
2 Jet database (direct connection)
3 OLE DB data source
4 Exchange data source
5 Oracle data source
6 DB2 data source
7 SQL Server CE (SSCE) data source
8 XML data source

-SubscriptionType [0|1|2]

Specifies the subscription type for distribution. A value of 0 indicates a push subscription (default), a value of 1 indicates a pull subscription, and a value of 2 indicates an anonymous subscription.

-SyncToAlternate [0|1]

Specifies whether the Merge Agent is synchronizing between a Subscriber and an alternate Publisher. A value of 1 indicates that it is an alternate Publisher. The default is 0.

-UploadGenerationsPerBatch upload_generations_per_batch

Is 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. The default for a reliable communication link is 100. The default for an unreliable communication link is 1.

-UploadReadChangesPerBatch upload_read_changes_per_batch

Is the number of changes to be read in a single batch while uploading changes from the Subscriber to the Publisher. The default is 100.

-UploadWriteChangesPerBatch upload_write_changes_per_batch

Is the number of changes to be applied in a single batch while uploading changes from the Subscriber to the Publisher. The default is 100.

-UseInprocLoader

Improves the performance of the initial snapshot by causing the Merge Agent to use the BULK INSERT command when applying snapshot files to the Subscriber.

-Validate [0|1|2|3]

Specifies whether validation should be done at the end of the merge session, and, if so, what type of validation.

Validate value Description
0 No validation (default)
1 Rowcount-only validation
2 Rowcount and checksum validation
3 Rowcount and binary checksum validation

Note  The value of 3 is the recommended value for use with SQL Server 2000; however, it cannot be used with earlier versions of SQL Server.

-ValidateInterval validate_interval

Is how often, in minutes, the subscription is validated in continuous mode. The default is 60 minutes.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft