Replication Merge Agent Utility
The Replication Merge Agent utility configures and begins a replication Merge Agent, which applies initial snapshots held in the database tables of the Publisher to the Subscribers. It also merges data changes made by the Publisher or Subscribers after the initial snapshot is created. This syntax is used at the command prompt, and the executable file can be found in the \Mssql7\Binn directory.
Syntax
replmerg [-?]
-Publisher publisher
-PublisherDB publisher_database
-Publication publication
-Subscriber subscriber
-SubscriberDB subscriber_database
[-Continuous]
[-DefinitionFile def_path_and_file_name]
[-Distributor distributor]
[-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]
[-ExchangeType [1|2|3]]
[-FastRowCount [0|1]]
[-FileTransferType [0|1]]
[-FtpAddress ftp_address]
[-FtpPassword ftp_password]
[-FtpPort ftp_port]
[-FtpUserName ftp_user_name]
[-HistoryVerboseLevel [0|1|2]]
[-Hostname host_name]
[-LoginTimeOut login_time_out_seconds]
[-Output]
[-OutputVerboseLevel [0|1|2]]
[-PollingInterval polling_interval]
[-ProfileName profile_name]
[-PublisherAddress publisher_address]
[-PublisherLogin subscriber_login]
[-PublisherNetwork publisher_network]
[-PublisherPassword publisher_password]
[-PublisherSecurityMode [0|1]]
[-QueryTimeOut query_time_out_seconds]
[-SubscriberDatabasePath subscriber_path]
[-SubscriberLogin subscriber_login]
[-SubscriberPassword subscriber_password
[-SubscriberSecurityMode [0|1]]
[-SubscriberType [0|1|2]]
[-SubscriptionType [0|1|2]]
[-UploadGenerationsPerBatch upload_generations_per_batch]
[-UploadReadChangesPerBatch upload_read_changes_per_batch]
[-UploadWriteChangesPerBatch upload_write_changes_per_batch]
[-Validate [0|1|2]]
[-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 publisher
- Is the name of the Publisher.
- -PublisherDB publisher_database
- Is the name of the Publisher database.
- -Publication publication
- Is the name of the publication. For both types of distribution, this parameter is valid only for immediate_sync publications. If this parameter is not specified, then the Distributor processes all the nonimmediate_sync publications in the Publisher database.
- -Subscriber subscriber
- Is the name of the Subscriber.
- -SubscriberDB subscriber_database
- Is the name of the Subscriber database.
- -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.
- -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. Double quotation marks (“) can be used to specify argument values containing arbitrary characters.
- -Distributor distributor
- Is the Distributor name. For Distributor (push) distribution, the name defaults to the name of the local Distributor.
- -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’s 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’s password.
- -DistributorSecurityMode [0|1]
- Specifies the Distributor’s security mode. A value of 0 indicates SQL Server Authentication Mode (default), and a value of 1 indicates Windows NT 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.
- -ExchangeType [1|2|3]
- Specifies the type of exchange. A value of 1 indicates a push exchange. A value of 2 indicates a pull exchange. A value of 3 indicates a bidirectional exchange (default).
- -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).
- -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 username used to connect to the FTP service. When not specified, anonymous is used.
- -HistoryVerboseLevel [0|1|2]
- Specifies the amount of history logged during a merge operation. You can minimize the performance affect of history logging by selecting 1.
HistoryVerboseLevel value |
Description |
1 |
Always update a previous history message of the same status (startup, progress, success, and so forth). 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 which case 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.
- -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, 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.
- -PublisherLogin publisher_login
- Is the Publisher’s login name. If PublisherSecurityMode is 0 (for Mixed Mode), then 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’s password. If PublisherSecurityMode is 0 (for Mixed Mode), then this parameter must be specified.
- -PublisherSecurityMode [0|1]
- Specifies the Publisher’s security mode. A value of 0 indicates Mixed Mode (default), and a value of 1 indicates Windows NT Authentication Mode.
- -QueryTimeOut query_time_out_seconds
- Is the number of seconds before the query times out. The default is 30 seconds.
- -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 DSN).
- -SubscriberLogin subscriber_login
- Is the Subscriber’s login name. If SubscriberSecurityMode is 0 (for Mixed Mode), then this parameter must be specified.
- -SubscriberPassword subscriber_password
- Is the Subscriber’s password. If SubscriberSecurityMode is 0 (for Mixed Mode), then this parameter must be specified.
- -SubscriberSecurityMode [0|1]
- Specifies the Subscriber’s security mode. A value of 0 indicates Mixed Mode (default), and a value of 1 indicates Windows NT Authentication Mode.
- -SubscriberType [0|1|2]
- 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 |
- -SubscriptionType [0|1|2]
- Specifies the subscription type for distribution. A value of 0 indicates a push subscription, a value of 1 indicates a pull subscription, and a value of 2 indicates an anonymous subscription.
- -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.
- -Validate [0|1|2]
- Specifies if validation should be done at the end of the merge session, and, if so, what type of validation. A value of 0 (default) indicates no validation. A value of 1 indicates rowcount-only validation. A value of 2 indicates rowcount and checksum validation.
- -ValidateInterval validate_interval
- Is how often, in minutes, the subscription is validated in continuous mode. The default is 60 minutes.
Important If you installed SQL Server Agent to run under a local system account rather than under a domain user account (the default), the service can access only the local computer. If the Merge Agent that runs under SQL Server Agent is configured to use Windows NT Authentication Mode when it logs in to Microsoft® SQL Server™, the Merge Agent fails. The default setting is Mixed Mode.
See Also
(c) 1988-98 Microsoft Corporation. All Rights Reserved.