Replication Log Reader Agent Utility

Command Prompt Utilities

Command Prompt Utilities

Replication Log Reader Agent Utility

The Replication Log Reader Agent utility configures and begins the Log Reader Agent, which monitors the transaction log of each database configured for replication, and copies the transactions marked for replication from the transaction log into the distribution database.

Syntax

logread [-?]
-Publisher server_name[\instance_name]
-PublisherDB publisher_database
[-Buffers number_of_buffers]
[-Continuous]
[-DefinitionFile def_path_and_file_name]
[-Distributor server_name[\instance_name]]
[-DistributorLogin distributor_login]
[-DistributorPassword distributor_password]
[-DistributorSecurityMode [0|1]]
[-HistoryVerboseLevel [1|2]]
[-LoginTimeOut login_time_out_seconds]
[-MessageInterval message_interval]
[-Output output_path_and_file_name]
[-OutputVerboseLevel [0|1|2]]
[-PacketSize packet_size]
[-PollingInterval polling_interval]
[-PublisherSecurityMode [0|1]]
[-PublisherLogin publisher_login]
[-PublisherPassword publisher_password]
[-QueryTimeOut query_time_out_seconds]
[-ReadBatchSize number_of_transactions]
[-ReadBatchThreshold read_batch_threshold]

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

-?

Displays usage information.

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

-Buffers number_of_buffers

Is the number of buffers available for asynchronous transactions. The default is 2. Increasing the number of buffers can increase performance because doing so reduces memory paging; however, a larger number of buffers also increases the amount of memory reserved for paging. Performance can be evaluated by seeing how a change in buffer values affects the speed of the connections between Subscriber and Distributor.

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

-DistributorLogin distributor_login

Is the Distributor login name.

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

-HistoryVerboseLevel [1|2]

Specifies the amount of history logged during a log reader operation. You can minimize the performance affect of history logging by selecting 1.

HistoryVerboseLevel value
Description
1 Default. 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 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.

-LoginTimeOut login_time_out_seconds

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

-MessageInterval message_interval

Is the time interval used for history logging. A history event is logged when one of these parameters is reached:

  • The TransactionsPerHistory value is reached after the last history event is logged.

  • The MessageInterval value is reached after the last history event is logged.

    If there is no replicated transaction available at the source, the agent reports a no-transaction message to the Distributor. This option specifies how long the agent waits before reporting another no-transaction message. Agents always report a no-transaction message when they detect that there are no transactions available at the source after previously processing replicated transactions. The default is 3600 (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 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.

-PacketSize packet_size

Is the packet size, in bytes. The default is 4096 (bytes).

-PollingInterval polling_interval

Is how often, in seconds, the log is queried for replicated transactions. The default is 10 seconds.

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

-PublisherLogin publisher_login

Is the Publisher login name.

-PublisherPassword publisher_password

Is the Publisher password.

-QueryTimeOut query_time_out_seconds

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

-ReadBatchSize number_of_transactions

Is the maximum number of transactions read out of the source. For the Log Reader Agent, the source is the transaction log of the publishing database. For the Distribution Agent, the source is the distribution database. The default is 500.

-ReadBatchThreshold read_batch_threshold

Is the number of replication commands to be read from the transaction log before being issued to the Subscriber by the Distribution Agent. The default is 100.

Remarks

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 Log Reader Agent that runs under SQL Server Agent is configured to use Windows Authentication Mode when it logs in to Microsoft® SQL Server™, the Log Reader Agent fails. The default setting is SQL Server Authentication.

For information about where to find or how to run this utility, see Getting Started with Command Prompt Utilities.

See Also

Log Reader Agent Profile

Replication Agents