Show TOC

sysadmin dump_queueLocate this document in the navigation structure

Dumps the contents of a Replication Server stable queue.

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

Identifies the stable queue to dump. 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.

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

num_cmds

Specifies the number of commands to dump. This number overrides <cnt>. If <num_cmds> is set to -1, the end of the current segment is the last command dumped. If <num_cmds> is set to -2, the end of the queue is the last command dumped.

L0

Dumps all of the stable queue’s content. This is the default behavior if L0, L1, L2, or L3 is not specified.

L1

Dumps only the begin and end commands of transactions found in the stable queue.

L2

Dumps the begin and end commands of the stable queue transactions together with the first 100 characters of all the other commands in the transactions.

L3

Dumps all of the stable queue’s content. 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.

"next"[, num_cmds]

Starts from where the last run of sysadmin dump_queue for a particular queue and session left off, and dumps the same number of commands or blocks that the last run did. You can use <num_cmds> to override the value of previous <cnt> or <num_cmds>.

If you use "next"[, num_cmds] without a prior invocation of sysadmin dump_queue, the dump starts from the beginning of the queue with the default values of seg -1, blk -1, and cnt -2, and <num_cmds> is treated as the number of commands.

Examples
Example 1

Acting on queue 103:1, dumps blocks 15–64 of segment 0 and blocks 1–15 of segment 1 into the Replication Server log:

sysadmin dump_queue, 103, 1, 0, 15, 65
Example 2

Dumps all of queue 103:1 into the RSSD:

sysadmin dump_queue, 103, 1, -1, 1, -2, RSSD
Example 3

Dumps the contents of queue 103:1 into SYDNEY_RS.log 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_queue, 103, 1, -1, 1, -2
sysadmin dump_file
Example 4
Dumps the contents of the inbound queue for SYDNEY_DS.<pubs2> into the Replication Server log:
sysadmin dump_queue, SYDNEY_DS, pubs2, 1, -1, 1, 
     -2, 10, “log”
Example 5
Dumps 10 commands of queue 103:1 into the Replication Server log:
sysadmin dump_queue, 103, 1, -1, 1, -2, 10, "log"
Example 6
Dumps only the begin and end commands of queue 103:1 into the Replication Server log:
sysadmin dump_queue, 103, 1, -1, 1, -2, L1
Example 7
Dumps the contents of queue 103:1 into the Replication Server log:
sysadmin dump_queue, 103, 1, -1, 1, -2, "next"
Example 8
Dumps, in chunks, the contents of queue 103:1 into the Replication Server log. "next" dumps the queue from where the last run of sysadmin dump_queue left off. In this example, the first call to sysadmin dump_queue dumps the first ten commands, the second call dumps the next ten commands, and the last call dumps the next 20 commands:
sysadmin dump_queue, 103, 1, -1, 1, -2, 10
sysadmin dump_queue, 103, 1, "next" 
sysadmin dump_queue, 103, 1, "next", 20
Usage
  • Use sysadmin dump_queue to dump the contents of a Replication Server stable queue.

  • sysadmin dump_queue dumps stable queues into one of these:
    • Replication Server log

    • Alternate log file

    • RSSD

    • Client issuing the command

    To dump queues into the RSSD or client, the last argument of sysadmin dump_queue must be RSSD or client.

    If the RSSD or client option is not specified, or if the "log" option is specified, 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 sysadmin dump_queue command length by setting the queue_dump_buffer_size configuration parameter.

Dumping to the RSSD

If the RSSD option is used, the dump is written into two system tables in the RSSD, <rs_queuemsg> and <rs_queuemsgtxt>.

If the queue is dumped into the RSSD, the system tables are first cleared of the segments with the same <q_number>, <q_type>, <seg>, and <blk> as the blocks 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 commands 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.

Dumping to the client

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

Permissions

sysadmin dump_queue requires “sa” permission.