Show TOC

sysadmin log_first_tranLocate this document in the navigation structure

Writes the first transaction in a DSI queue into the exceptions log.

Syntax
sysadmin log_first_tran, [<n>], <data_server>, <database>
Parameters
n

Specifies the number of transactions to write to the database exceptions log, and to either the Replication Server log or the alternative log file specified by the sysadmin dump_file command.

data_server

The name of the data server with the database.

database

The name of the database from whose DSI queue the first transaction is to be written.

Examples
Example 1

Writes the first transaction in this DSI queue to the exceptions log:

sysadmin log_first_tran, SYDNEY_DS, pubs2
Example 2
Writes the first five transactions in the DSI queue to the database exceptions log, and to either the Replication Server log or the location specified by the sysadmin dump_file command:
sysadmin log_first_tran, 5, SYDNEY_DS, pubs2
Example 3
Writes the first two transactions in the DSI queue to the database exceptions log and to the SYDNEY_RS.log file. The last sysadmin dump_file command closes the SYDNEY_RS.log file:
sysadmin dump_file SYDNEY_RS.log
sysadmin log_first_tran, 2, SYDNEY_DS, pubs2
sysadmin dump_file
Usage
  • Use sysadmin log_first_tran to write the first <n> transactions in the DSI queue into the exceptions log, and to either the Replication Server log or the alternative log file specified by the sysadmin dump_file command. The commands of the transaction written to the log file are converted to the target data server specific commands and can be applied to the target data server directly.

  • This command does not delete the first <n> transactions from the queue.

  • The exceptions log consists of three tables, <rs_exceptshdr>, <rs_exceptscmd>, and <rs_systext>. See “Replication Server System Tables” for detailed descriptions of these tables.

  • If you want to check failed transactions caused by data server errors by using sysadmin log_first_tran, make sure the dsi_retry parameter is set to 0. The default value of the dsi_retry parameter is 0, refer to the alter connection command for more details about dsi_retry.
Permissions

sysadmin log_first_tran requires “sa” permission.