Use this command to dump contents of the transaction cache for each inbound queue. sysadmin sqt_dump_queue dumps all the statements of transactions that have not yet been deleted.
Commands are dumped into the Replication Server log or an alternate log file created using the sysadmin dump_file command. In the current version of Replication Server, you cannot dump the transaction cache into the RSSD.
Before using this command, make sure the transaction cache for the database exists using admin who, sqt.
Output from sysadmin sqt_dump_queue shows the state of transactions in the transaction cache: Open, Closed, or Read. Open transactions do not yet have a commit. Closed transactions have a commit but have not yet been completely read. Read transactions have been completely read but have not yet been deleted.
Following is the syntax for the sysadmin dump_queue command:
sysadmin sqt_dump_queue,q_number,q_type,reader [,open]
q_number, q_type – identifies the stable queue to dump. These values can be found by using the admin who command, the admin who, sqm command, and the admin who, sqt command.
reader – identifies the reader you want to dump the stable queue. This parameter applies to features that require multiple readers, such as warm standby applications. You can get the reader number by running admin sqm_readers or admin who, sqt. If you are not using multiple readers, enter “0.”
open – allows you to dump only open transactions. If you use this option, insert a comma before it.
The following examples demonstrate the use of sysadmin sqt_dump_queue.
This command acts on inbound queue 103:1. All undeleted transactions in the queue are dumped from the transaction cache:
sysadmin sqt_dump_queue, 103, 1, 0
The following series of commands dumps open transactions into the file qdump from the transaction cache for queue 103:1. The last command closes qdump:
sysadmin dump_file, qdump
sysadmin sqt_dump_queue, 103, 1, 0, open
sysadmin dump_file
In an isql session against the NYDS.nydb database, run a begin tran test to start an open transaction.admin who, sqt
Spid State Info ---- --------------- --------------- 20 Awaiting Wakeup 102:1 NYDS.nydb Closed Read Open Trunc Removed ------ ---- ---- ----- ------- 0 0 1 1 0 Full SQM Blocked First Trans ---- ----------- ---------------------- 0 1 st:O,cmds:1,qid:0:42:0 Parsed ------ 0
The output of the command shows one queue with an open transaction:
Running sysadmin sqt_dump_queue,102,1, 0 returns the dump output:
I. 96/06/28 17:18:50. TRANSACTION CACHE for 102:1
I. 96/06/28 17:18:51. TRAN_OPEN TID='0000000100000a' g '0013' NYDSnydb Origin=102. 1 commands. in memory
I. 96/06/28 17:18:51. Tran Name 'test' User:'sa'
I. 96/06/28 17:18:51. LQID 0:42:0 begin transaction test
I. 96/06/28 17:18:51. END TRANSACTION CACHE for 102:1