Vous êtes sur la page 1sur 3

MQ COMMANDS

REFRESH RESET RESOLV RESUME START STOP SUSPEND


E
CLUSTER CHANNE CHANNEL QMGR CHANNEL CHANNEL QMGR CLUSTER
L CLUSTER
SECURITY CLUSTER QMGR CHINIT LISTENER QMGR CLUSNL
CLUSNL
QMGR LISTENER SERVICE
SERVICE CONN

Description Command
To Display mq version $ DSPMQVER
To Display all MQ's $ DSPMQ
To create a queue manager $ crtmqm -q -d MY.DEFAULT.XMIT.QUEUE -
u DEAD.LETTER.QUEUE QM1
To Start a Queue Mgr $ STRTMQM qmgrname
TO
To Start a QMgr automatically when os $ AMQMDAIN AUTO <QMgr>
starts
Disable QMgr starting automatically $AMQMDAIN MANUAL <QMgr>
Normal shutdown endmqm <QMGR>
Immediate Shutdown endmqm -i <QMGR>

To Display information about a specific $ DSPMQ -M qmgrname


QMGR
To enterinto a queumanager or $ RUNMQSC qmgrname
runmqsc mode
To come out or exit RUNMQSC mode $ END
To put a msg in queue (Shud be out of $ AMQSPUT <queuename> <queuemgrname>
RUNMQSC cmd mode)
To get or read a msg from queue $AMQSGET <queuename> <queuemgrname>
To Publish a topic onto a queue Syntax:- AMQPUB <TOPICNAME> <QMGRNAME>
manager $ AMQSPUB DELL.TOPIC QMGR1
To Subsribe a topic from a queue $ AMQSSUB DELL.TOPIC QMGR1
Display Command Server status on a $ DSPMQCSV <Qmgr>
QMgr
START/Stop Command server STRMQCSV / DSPMQCSV/ ENDMQCSV <Qmgr>
Run the command server $ RUNMQSC <Qmgr>
Queue Commands
To subscribe to a topic onto a queue $ AMQSSUB DELL.TOPIC QMGR1
manager

To Display Queue properties $ DISPLAY QL('ql1')


To Display queue status $ DISPLAY QSTATUS('lq1') TYPE(QUEUE) ALL
To alter/change queue properties ALTER QUEUETYPE <queuename> PUT(ENABLED)
$ ALTER QL('ql1') PUT(ENABLED)
To alter multiple queue properties at a ALTER QUEUETYPE< queuename> PUT(ENABLED) GET
time (DISABLED) MAXDEPTH(max no.of msgs)
$ ALTER QL('ql1') PUT(ENABLED) GET(DISABLED)
MAXDEPTh(10)
To display mq reason codes $ MQRC 2085
To Create alias queue go to runmqsc $ DEFINE QALIAS('aliasqueuename')
mode TARGET('targetqueuename')
To Create a Remote Queue $ DEFINE QR(QMGR1.RQ) RNAME(QMGR2.LQ)
RQMNAME(QMGR2) XMITQ(QMGR2))
To clear local queues (Note: clear $ CLEAR QL('ql1')
command will work only on local
queues)
Display Current Queue Depth $ DIS QL(QueueName) CURDPTH

To browse or display a msg $ AMQSBCG


Inactivate the channel $ STOP CHANNEL(CH.QMGR1.QMGR2)
STATUS(INACTIVE)
Display channel Status $ DIS CHSTATUS (channel name)
Start channel $ START CHANNEL (CH.QMGR1.QMGR2)
Stop Channel $ STOP CHANNEL(CH.QM1.QM2) STATUS(INACTIVE)
Define Sender chanel $ DEFINE CHANNEL(CH.QMGR1.QMGR2) CHLTYPE(SDR)
CONNAME('localhost(2240)') XMITQ(QMGR2)
Define Receiver Channel $ DEFINE CHL(CH.QMGR1.QMGR2) CHLTYPE(RCVR)
Resolve channel $ RESOLVE CHL(CHName) ACTION(COMMIT/BACKOUT)
Reset channel (sdr channel only) $ RESET CHANNEL(CHNAME) SEQNUM(1)
Create a listener $ DEFINE LSTR(QMGR2.LSTR) TRPTYPE(TCP)
PORT(2240)
Start the listener $ START LSTR(QMGR2.LSTR)
Display listener status $ DIS LSSTATUS(QMGR2.LSTR)
Open MQ Browser $ STRMQCFG

25. What is the command used for stopping the Queue manager?

$ endmqm -w QMName

The command waits until all applications have stopped and the queue manager has
ended.
$ endmqm –i QMName

This type of shutdown does not wait for applications to disconnect from the queue
manager.

Vous aimerez peut-être aussi