Dumping the contents of the log using the dmpmqlog command

How to use the dmpmqlog command to dump the contents of the queue manager log.

Use the dmpmqlog command to dump the contents of the queue manager log. By default all active log records are dumped, that is, the command starts dumping from the head of the log (usually the start of the last completed checkpoint).

The log can usually be dumped only when the queue manager is not running. Because the queue manager takes a checkpoint during shutdown, the active portion of the log usually contains a small number of log records. However, you can use the dmpmqlog command to dump more log records using one of the following options to change the start position of the dump:
  • Start dumping from the base of the log. The base of the log is the first log record in the log file that contains the head of the log. The amount of additional data dumped in this case depends on where the head of the log is positioned in the log file. If it is near the start of the log file, only a small amount of additional data is dumped. If the head is near the end of the log file, significantly more data is dumped.
  • Specify the start position of the dump as an individual log record. Each log record is identified by a unique log sequence number (LSN). In the case of circular logging, this starting log record cannot be before the base of the log; this restriction does not apply to linear logs. You might need to reinstate inactive log files before running the command. You must specify a valid LSN, taken from previous dmpmqlog output, as the start position.

    For example, with linear logging you can specify the nextlsn from your last dmpmqlog output. The nextlsn appears in Log File Header and indicates the LSN of the next log record to be written. Use this as a start position to format all log records written since the last time the log was dumped.

  • For linear logs only, you can instruct dmpmqlog to start formatting log records from any given log file extent. In this case, dmpmqlog expects to find this log file, and each successive one, in the same directory as the active log files. This option does not apply to circular logs, where dmpmqlog cannot access log records prior to the base of the log.

The output from the dmpmqlog command is the Log File Header and a series of formatted log records. The queue manager uses several log records to record changes to its data.

Some of the information that is formatted is only of use internally. The following list includes the most useful log records:

Log File Header
Each log has a single log file header, which is always the first thing formatted by the dmpmqlog command. It contains the following fields:
Log Record Header
Each log record within the log has a fixed header containing the following information:
Start Queue Manager
This logs that the queue manager has started.
Stop Queue Manager
This logs that the queue manager has stopped.
Start Checkpoint
This denotes the start of a queue manager checkpoint.
End Checkpoint
This denotes the end of a queue manager checkpoint.
Put Message
This logs a persistent message put to a queue. If the message was put under sync point, the log record header contains a non-null XTranid. The remainder of the record contains:
Put Part
Persistent messages that are too large for a single log record are logged as multiple Put Part log records followed by a single Put Message record. If there are Put Part records, then the PrevLSN field will chain the Put Part records and the final Put Message record together.
Get Message
Only gets of persistent messages are logged. If the message was got under sync point, the log record header contains a non-null XTranid. The remainder of the record contains:
Start Transaction
Indicates the start of a new transaction. A TranType of MQI indicates a WebSphere MQ-only transaction. A TranType of XA indicates one that involves other resource managers. All updates made by this transaction will have the same XTranid.
Prepare Transaction
Indicates that the queue manager is prepared to commit the updates associated with the specified XTranid. This log record is written as part of a two-phase commit involving other resource managers.
Commit Transaction
Indicates that the queue manager has committed all updates made by a transaction.
Rollback Transaction
This denotes the queue manager's intention to roll back a transaction.
End Transaction
This denotes the end of a rolled-back transaction.
Transaction Table
This record is written during sync point. It records the state of each transaction that has made persistent updates. For each transaction the following information is recorded:
Transaction Participants
This log record is written by the XA Transaction Manager component of the queue manager. It records the external resource managers that are participating in transactions. For each participant the following is recorded:
Transaction Prepared
This log record is written by the XA Transaction Manager component of the queue manager. It indicates that the specified global transaction has been successfully prepared. Each of the participating resource managers will be instructed to commit. The RMID of each prepared resource manager is recorded in the log record. If the queue manager itself is participating in the transaction a Participant Entry with an RMID of zero will be present.
Transaction Forget
This log record is written by the XA Transaction Manager component of the queue manager. It follows the Transaction Prepared log record when the commit decision has been delivered to each participant.
Purge Queue
This logs the fact that all messages on a queue have been purged, for example, using the MQSC command CLEAR QUEUE.
Queue Attributes
This logs the initialization or change of the attributes of a queue.
Create Object
This logs the creation of a WebSphere MQ object.
Delete Object
This logs the deletion of a WebSphere MQ object.