IBM MQ cheat sheet

Queue manager operations

Get the queue managers running on a host

It can also be used to check if a queue manager is running

dspmq

Start/stop a queue manager

strmqm REPLACE_QUEUE_MANAGER
endmqm REPLACE_QUEUE_MANAGER

Use “-i” to force stop it

Export the configuration of a queue manager

dmpmqcfg -m REPLACE_QUEUE_MANAGER -a

Get the ports a queue manager is listening to

display lsstatus(*) ALL
display listener(*)

Apply changes like creating queues

Optionally add -v for a dryrun to check it has correct syntax and valid changes

runmqsc REPLACE_QUEUE_MANAGER < REPLACE_SCRIPT_PATH

Get the authentication config of a queue manager

display authinfo(*)

Refresh the MQ security cache

refresh security

Connect to a queue manager to interact with it

runmqsc REPLACE_QUEUE_MANAGER

Queue operations

Get all the queues

display queue(*)
display qlocal(*)
display qremote(*)

Get the details of a queue

display queue(REPLACE_QUEUE_NAME)
display qlocal(REPLACE_QUEUE_NAME)
display qremote(REPLACE_QUEUE_NAME)

Channel operations

Get all the channels

display channel(*)

Get details of a channel

display channel(REPLACE_CHANNEL_NAME)

Stop/restart a channel

stop channel(REPLACE_CHANNEL_NAME)
start channel(REPLACE_CHANNEL_NAME)

Reset a channel to correct sequence mismatches

reset channel(REPLACE_CHANNEL_NAME) seq(1)

Fix a channel with a poisoned message

Delete the message and restart the channel

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>