Replication Log Reader Agent Utility
The Replication Log Reader Agent utility configures and begins a replication Log Reader Agent, which moves transactions marked for replication from the transaction log on the Publisher to the distribution database. This syntax is used at the command prompt, and the executable file can be found in the \Mssql7\Binn directory.
Syntax
logread [-?]
-Publisher publisher
-PublisherDB publisher_database
[-AsynchLogging]
[-Buffers number_of_buffers]
[-Continuous]
[-DefinitionFile def_path_and_file_name]
[-Distributor distributor]
[-DistributorLogin distributor_login]
[-DistributorPassword distributor_password]
[-DistributorSecurityMode [0|1]]
[-HistoryVerboseLevel [0|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
- -?
- Prints all available parameters.
- -Publisher publisher
- Is the name of the Publisher.
- -PublisherDB publisher_database
- Is the name of the Publisher database.
- -AsynchLogging
- Specifies that a background thread is used to write history messages to replication monitoring tables. AsynchLogging takes no argument, and defaults to false when not specified.
- -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 distributor
- Is the Distributor name.
- -DistributorLogin distributor_login
- Is the Distributor’s login name.
- -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.
- -HistoryVerboseLevel [0|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 |
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. |
- -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 if either:
- The TransactionsPerHistory value is reached after the last history event is logged.
Or
- 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 Publisher’s security mode. A value of 0 indicates Mixed Mode (default), and a value of 1 indicates Windows NT Authentication Mode.
- -PublisherLogin publisher_login
- Is the Publisher’s login name.
- -PublisherPassword publisher_password
- Is the Publisher’s 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.
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 NT Authentication Mode when it logs in to Microsoft® SQL Server™, the Log Reader Agent fails. The default setting is Mixed Mode.
See Also
(c) 1988-98 Microsoft Corporation. All Rights Reserved.