Show TOC

sysadmin dump_open_tranLocate this document in the navigation structure

The sysadmin dump_open_tran command dumps all open transactions in a stable inbound queue. Open transactions prevent the truncation point of an inbound queue from moving forward, and fill up the disk partition.

Syntax
sysadmin dump_open_tran {, q_number | server[,database]}, qtype
	   {
        , seg, blk, cnt
        [, {L0 | L1 | L2 | L3}]
        [, {RSSD | client | “log” | file_name
        }]
       }
Parameters
q_number | server[, database]

Identifies the stable queue to dump open transactions. Use either <q_number> or <server>[, <database>] to specify the queue number. You can use admin who, admin who, sqm, and admin who, sqt to identify the queue number.

q_type

The queue type of the stable queue. Values are 0 for outbound queues and 1 for inbound queues. Use admin who, admin who, sqm, and admin who, sqt to identify the queue type.

seg

Identifies the starting segment.

blk

Identifies the 16K block in the segment where the dump is to begin. Block numbering starts at 1 and ends at 64.

This command recognizes four special settings for <seg> and <blk>:
  • Setting <seg> to -1 starts with the first active segment in the queue.

  • Setting <seg> to -2 starts with the first segment in the queue, including any inactive segments retained by setting a save interval.

  • Setting <seg> to -1 and <blk> to -1 starts with the first undeleted block in the queue.

  • Setting <seg> to -1 and <blk> to -2 starts with the first unread block in the queue.

cnt

Specifies the number of blocks to dump. This number can span multiple segments. If <cnt> is set to -1, the end of the current segment is the last block dumped. If it is set to -2, the end of the queue is the last block dumped.

L0

Dumps all the content of open transactions. This is the default behavior if L0, L1, L2, or L3 is not specified.

L1

Dumps only the begin command of open transactions found in the stable queue.

L2

Dumps the begin command of open transactions with the first 100 characters of all the other commands in the transactions.

L3

Dumps all the content of open transactions. Except for SQL statements, all other commands are printed as comments. You can use L3 only when you use the <file_name> option or the sysadmin dump_file command to specify an alternate log file. You cannot use L3 with RSSD or client options.

RSSD

Forces output to system tables in the RSSD.

client

Forces output to the client that is issuing this command.

"log"

Forces output to the Replication Server log file.

file_name

Forces the output into the <file_name> log file. You can also set an alternate log file using the sysadmin dump_file command. The location of this file is recorded in the Replication Server log.

Examples
Example 1
Acting on inbound queue 103:1, dumps open transactions between blocks 15–35 of segment 0 into the Replication Server log:
sysadmin dump_open_tran, 103, 1, 0, 15, 20
Example 2
Dumps all open transactions of inbound queue 103:1 into the RSSD:
sysadmin dump_open_tran, 103, 1, -1, 1, -2, RSSD
Example 3
Dumps the contents of open transactions from inbound queue 103:1 into the SYDNEY_RS_log file. The last sysadmin dump_file command closes SYDNEY_RS.log, and any subsequent dumps are directed to the Replication Server log:
sysadmin dump_file, SYDNEY_RS_log
sysadmin dump_open_tran, 103, 1, -1, 1, -2
sysadmin dump_file
Example 4
Dumps the contents of open transactions from inbound queue for SYDNEY_DS.pubs2 into the Replication Server log:
sysadmin dump_open_tran, SYDNEY_DS, pubs2, 1, -1, 1, -2, “log”
Example 5
Dumps only the begin command of open transactions from inbound queue 103:1 into the Replication Server log:
sysadmin dump_open_tran, 103, 1, -1, 1, -2, L1
Usage
  • Use sysadmin dump_open_tran to dump the contents of open transactions from a stable inbound queue in Replication Server.
    Note

    A transaction is open when the Replication Agent has forwarded the transaction begin record, and possibly some commands within the transaction, but has not yet forwarded the transaction commit or abort records.

  • sysadmin dump_open_tran dumps the contents of open transactions into one of the following:

    • Replication Server log

    • Alternate log file

    • RSSD

    • The Client that issued the command

  • To dump queues into the RSSD or Client, the last argument of sysadmin dump_open_tran must be either RSSD or client. If these arguments are not specified, or if the "log" option is used, output goes into the Replication Server log. If an alternative log file for dumping queues is specified through the sysadmin dump_file command or through the file_name option, the output goes into the alternative dump file.

  • Specify the maximum command length used by this command by setting the queue_dump_buffer_size configuration parameter.

  • Using the RSSD option for dumping:

    If the RSSD option is used, the dump is written into two system tables in the RSSD, rs_queuemsg and rs_queuemsgtxt. Also, the system tables are first cleared of the segments with the same q_number, q_type, seg, and blk, as the transaction is being dumped. For information about the contents of the rs_queuemsg system table, see Replication Server System Tables. The rs_queuemsgtxt system table holds the text of the commands that were dumped from the stable queue. If the text of a command exceeds 255 characters, it is stored in multiple rows numbered with the q_seq column.

  • Using the Client option for dumping:

    If the client option is used, the dump is written to the client that issued the command, such as isql, or Replication Server Manager.

  • Permission:

    sysadmin dump_open_tran requires “sa” permission.