The sysadmin dump_queue command dumps the contents of a Replication Server stable queue to the Replication Server log, an alternate log file, the client, or to tables in the RSSD. You can examine the dump to see the messages in the stable queue. This may help you to identify and reapply transactions that have not been applied or applied incorrectly to the replicate database.
Here is the syntax for the sysadmin dump_queue command:
sysadmin dump_queue, q_number, q_type, seg, blk, cnt [,RSSD | client]
q_number, q_type – identifies the stable queue to dump. Examine the output of the admin who command or the admin who, sqm command to find these values.
seg – identifies the starting segment. If set to -1, the starting segment is the first active segment in the queue. If set to -2, the starting segment is the first segment in the queue and includes any inactive segments retained by setting a save interval.
blk – identifies the 16K block in the segment where the dump is to begin. Block numbering starts at 1 and ends at 64. The following two additional options are used with the seg setting:
If seg is -1 and blk is -1, then start with the first undeleted block of the queue.
If seg is -1 and blk is -2, then start with the first unread block of the queue. For example, if the RSI and DSI are down, then executing sysadmin dump_queue with these parameters dumps the unread segments in the queue.
cnt – specifies the number of blocks to dump. This number can span multiple segments. If set to -1, the end of the current segment is the last block dumped. If set to -2, the end of the queue is the last block dumped.
RSSD – optional flag that forces the output to system tables in the RSSD. If you use this option, insert a comma before it. Sending output to the RSSD is the slowest option.
If the RSSD option is used, then:
System tables are first cleared of the segments with the same q_number, q_type, seg, and blk as the blocks are being dumped, and
Dump is written into two tables in the Replication Server system database: rs_queuemsg and rs_queuemsgtxt.
The rs_queuemsg table has the following columns:
q_number
q_type
q_seg
q_blk
q_row
len
origin_site_id
origin_q_id
origin_time (used only at the beginning of a transaction)
origin_user
tran_name
local_q_id
status
reserved
tran_len
txt_len
tran_id
lorigin_site_id
version
Only the begin transaction command uses the origin_time, origin_user, and tran_name columns.
The rs_queuemsgtxt 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_seg column.
client – optional flag that forces the output to the client that is issuing this command.
If the client option is used, the dump is written into the client that is issuing this command, such as isql or Replication Server Manager.
The client output has the following columns:
Q Number
Q Type
Segment
Block
Row
Message Len
Orgn Siteid
Orgn Time
Orgn Qid
Orgn User
Tran Name
Local Qid
Status
Tranid
Logical Orgn Siteid
Version
Command Len
Seq No
Command
If you do not specify the RSSD or client option, the output will go into the Replication Server log. If you use the sysadmin dump_file command to specify an alternative log file for dumping queues, the output will go into the alternate dump file.