Delen via


Replication Queue Reader Agent

The Replication Queue Reader Agent is an executable that reads messages stored in a Microsoft SQL Server queue or a Microsoft Message Queue and then applies those messages to the Publisher. Queue Reader Agent is used with snapshot and transactional publications that allow queued updating.

Note

Parameters can be specified in any order. When optional parameters are not specified, predefined values based on the default agent profile are used.

Syntax

qrdrsvc [-?]
[-Continuous]
[-DefinitionFile definition_file]
[-Distributor server_name[\instance_name]]
[-DistributionDB distribution_database]
[-DistributorLogin distributor_login]
[-DistributorPassword distributor_password]
[-DistributorSecurityMode [0|1]]
[-EncryptionLevel [0|1|2]]
[-HistoryVerboseLevel [0|1|2|3]]
[-LoginTimeOut login_time_out_seconds]
[-Output output_path_and_file_name]
[-OutputVerboseLevel [0|1|2]]
[-PollingInterval polling_interval]
[-PublisherFailoverPartner server_name[\instance_name] ]
[-ProfileName agent_profile_name]
[-QueryTimeOut query_time_out_seconds]
[-ResolverState [1|2|3]]

Arguments

  • -?
    Displays usage information.

  • -Continuous
    Specifies whether the agent attempts to process queued transactions continuously. If specified, the agent continues execution even if there are no queued transactions pending from any of the subscribers.

  • -DefinitionFiledef_path_and_file_name
    Is the path of the agent definition file. An agent definition file contains command-line 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.

  • -Distributorserver_name[**\**instance_name]
    Is the Distributor name. Specify server_name for the default instance of SQL Server on that server. Specify server_name\instance_name for a named instance of SQL Server on that server. If not specified, the name defaults to the name of the default instance of SQL Server on the local computer.

  • -DistributionDBdistribution_database
    Is the distribution database.

  • -DistributorLogindistributor_login
    Is the Distributor login name.

  • -DistributorPassworddistributor_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.

  • -EncryptionLevel [ 0 | 1 | 2 ]
    Is the level of Secure Sockets Layer (SSL) encryption used by the Queue Reader Agent when making connections.

    EncryptionLevel value

    Description

    0

    Specifies that SSL is not used.

    1

    Specifies that SSL is used, but the agent does not verify that the SSL server certificate is signed by a trusted issuer.

    2

    Specifies that SSL is used, and that the certificate is verified.

    For more information, see Security Overview (Replication).

  • -HistoryVerboseLevel [ 0| 1| 2| 3]
    Specifies the amount of history logged during a queue reader operation. You can minimize the effect of history logging on performance by selecting 1.

    HistoryVerboseLevel value

    Description

    0

    No history logging (not recommended).

    1

    Default. 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

    Insert new history records, including idle messages or long-running job messages.

    3

    Insert new history records that include additional details that may be useful for troubleshooting.

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

  • -Outputoutput_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 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.

  • -PollingIntervalpolling_interval
    Is relevant only for updating subscriptions that use SQL Server based queues. Specifies how often, in seconds, the SQL Server queue is polled for pending queued transactions. The value can be between 0 and 240 seconds. The default is 5 seconds.

  • -PublisherFailoverPartnerserver_name[**\**instance_name]
    Specifies the failover partner instance of SQL Server participating in a database mirroring session with the publication database. For more information, see Replication and Database Mirroring.

  • -ProfileNameagent_profile_name
    Is the name of an agent profile used to supply a set of default values to the agent. For information, see Replication Agent Profiles.

  • -QueryTimeOutquery_time_out_seconds
    Is the number of seconds before the query times out. The default is 1800 seconds.

  • -ResolverState [ 1| 2| 3]
    Specifies how queued updating conflicts are resolved. A value of 1 indicates the Publisher wins the conflict, and the current conflicting queued transaction will be rolled back on the Publisher and the originating updating Subscriber; the processing of subsequent queued transactions will continue. A value of 2 indicates the Subscriber wins the conflict, and the queued transaction will override the values on the Publisher. A value of 3 indicates that any conflict will result in Subscriber re-initialization; the Publisher wins the conflict, processing of subsequent queued transactions will be terminated, and the subscription will be reinitialized. The default setting is 1 for transactional publications and 3 for snapshot publications.

Remarks

To start the Queue Reader Agent, execute qrdrsvc.exe from the command prompt. For information, see Replication Agent Executables.