Examining the Exceptions Log

Examine the exceptions log to determine the transactions that have been skipped.

Skipped transactions are written into the exceptions log. Orphan transactions and transactions logged by sysadmin log_first_tran are also in the exceptions log.

If a replicate database is not receiving updates, the update transactions may have been skipped and written into the exceptions log.

The exception log consists of three tables: rs_exceptshdr, rs_exceptscmd, and rs_systext. The rs_exceptshdr table has one entry for each transaction. The rs_exceptscmd table has one entry for each command (either source or output) of the transaction. The rs_systext table stores the text of the commands. See the Replication Server Reference Manual.

  1. Log in to the system Adaptive Server for the Replication Server controlling the database.
  2. Execute this query against the Replication Server System Database (RSSD) to view the header information for all logged transactions intended for a database:
    select * from rs_exceptshdr
         where error_site = data_server
        and error_db = database
        order by log_time
    The rows are returned in ascending order, of the time the transactions were logged. To list the rows in descending order, include “desc” at the end of the query.
  3. Join the three system tables to view all information about a transaction in the log.
    This query gives the source commands and their corresponding output commands for each logged transaction:
    select hdr.sys_trans_id, cmd_type, textval
         from rs_exceptshdr hdr,
             rs_exceptscmd cmd,
             rs_systext
         where error_site = data_server
           and error_db = database
            and hdr.sys_trans_id = cmd.sys_trans_id
             and cmd_id = parentid
         order by log_time, src_cmd_line,
             output_cmd_index, sequence