{"id":3678,"date":"2014-11-02T16:45:50","date_gmt":"2014-11-02T08:45:50","guid":{"rendered":"http:\/\/rmohan.com\/?p=3678"},"modified":"2015-03-10T20:41:16","modified_gmt":"2015-03-10T12:41:16","slug":"websphere-mq-basic-administration-commands","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=3678","title":{"rendered":"websphere mq: basic administration commands"},"content":{"rendered":"<p>launch<br \/>\nrunmqsc<\/p>\n<p>display queue manager(s)<br \/>\ndisplay qmmgr(*)<\/p>\n<p>display queue(s)<br \/>\ndisplay queue(*)<\/p>\n<p>display channel(s)<br \/>\ndisplay channel(*)<\/p>\n<p>display listener(s)<br \/>\ndisplay listener(*)<\/p>\n<p>check queue status<br \/>\ndisplay qstatus(*)<\/p>\n<p>clear queue<br \/>\nclear qlocal(queue_name)<\/p>\n<p>display connections<br \/>\ndisplay conn(*)<\/p>\n<p>dspmq<br \/>\nrunmqsc <queue manager><br \/>\ndis chs (channel)<br \/>\nstart chl (channel)<br \/>\nstop chl (channel)<br \/>\nreset chl (channel)<br \/>\nstart chl (channel)<br \/>\nend<\/p>\n<p>Start Q Manager<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nstrmqm OFB.OCE.QMGR<\/p>\n<p>Stop Q Manager<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nendmqm -w OFB.OCC.QMGR<\/p>\n<p>endmqm -w OFB.OCC.QMGR<br \/>\nflags:<br \/>\n-w wait for clients<br \/>\n-i immediate<br \/>\nDisplay listener status<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\ndis lsstatus(*)<br \/>\nDIS LSSTATUS(*)<\/p>\n<p>Display queue names and number of messages in the queue<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\ndis queue curdepth(*)<\/p>\n<p>Display the queue Depth<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\ndis ql (*) where (curdepth gt 500)<\/p>\n<p>dis ql(*) CURDEPTH WHERE(CURDEPTH GT 0 )<\/p>\n<p>Display where channel is RETRYING<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\ndis chs (*) where (status EQ running)<\/p>\n<p>dis chs (*) where (status EQ retrying)<\/p>\n<p>Display Current Sequence Number<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\ndis chs (channel) CURSEQNO<br \/>\n( * )<\/p>\n<p>dis chl(*) -> display all channels<br \/>\ndis chs(*) -> display all channels that are running<br \/>\ndis chs (channel)  -> display channel status<br \/>\nstart chl (channel)<br \/>\nstop chl (channel)<br \/>\nreset chl (channel)<br \/>\nstart chl (channel)<br \/>\nend<\/p>\n<p>echo &#8220;dis q(*)&#8221; | runmqsc <qmanager><\/p>\n<p>\tendmqm qmanager<br \/>\n\tstrmqm qmanager<\/p>\n<p>Command to start the queue manger <\/p>\n<p>Start the Quemanager<br \/>\nstrmqm -x QMGR2<\/p>\n<p>strmqm QMGR2<\/p>\n<p>Stop the Queue Manager <\/p>\n<p>endmqm qmanager<\/p>\n<p>endmqm  TPCAS.AUD.QMGR2<\/p>\n<p>Check the queue manager is working <\/p>\n<p>$  dspmq -x<br \/>\nQMNAME(TPCAS.AUD.QMGR1)                                   STATUS(Running)<br \/>\n    INSTANCE(instancename) MODE(Active)<\/p>\n<p>Connect to queue manager<\/p>\n<p>runmqsc QMGR1<\/p>\n<p>dis channel (*)<\/p>\n<p>Logs \/var\/mqm\/errors<\/p>\n<p>runmqsc ROLBRKPRDV.QM<br \/>\nSTOP CHANNEL(VROLBRK.VIPC)<br \/>\nRESET CHANNEL(VROLBRK.VIPC) SEQNUM(407918)<br \/>\nSTART CHANNEL(VROLBRK.VIPC)<\/p>\n<p>DISPLAY CHSTATUS (VROLBRK.VIPC.*) <\/p>\n<p>DISPLAY CHSTATUS (CDISI.CORE.AUDIT)<\/p>\n<p>runmqsc ROLBRKPRDS.QM<br \/>\ndis chl(B*)<br \/>\nstart CHANNEL(BRKPRDS.TO.VP04VRL)<\/p>\n<p>Start MQSC<br \/>\n1\trunmqsc <qmanager><\/p>\n<p>MQSC:show queue information<br \/>\n1\tdisplay q(<qname>)<\/p>\n<p>MQSC:remove all messages from queue<br \/>\n1\tclear ql(<qname>)<\/p>\n<p>MQSC:enable trigger on queue<br \/>\n1\talter ql(<qname>) trigger<\/p>\n<p>MQSC:disable trigger on queue<br \/>\n1\talter ql(<qname>) notrigger<\/p>\n<p>MQSC:show process information<br \/>\n1\tdisplay process(<process>)<\/p>\n<p>Using runmqsc in a script<br \/>\n1\techo &#8220;dis q(*)&#8221; | runmqsc <qmanager><\/p>\n<p>This vill display all queues (\u2018dis q(*)\u2019) on the qmanager <qmanager><\/p>\n<p>Using the q (ma01) program to distribute messages from one queue to two queues<br \/>\n1\tq -m QMGR -I TEST.DISTLIST.IN -o TEST.DISTLIST.OUT1 -o TEST.DISTLIST.OUT2<\/p>\n<p>\tendmqm qmanager<br \/>\n\tstrmqm qmanager<\/p>\n<p>runmqsc ROLBRKPRDV.QM<br \/>\nSTOP CHANNEL(VROLBRK.VIPC)<br \/>\nRESET CHANNEL(VROLBRK.VIPC) SEQNUM(407918)<br \/>\nSTART CHANNEL(VROLBRK.VIPC)<\/p>\n<p>DISPLAY CHSTATUS (VROLBRK.VIPC.*) <\/p>\n<p>runmqsc ROLBRKPRDS.QM<br \/>\ndis chl(B*)<br \/>\nstart CHANNEL()<\/p>\n<p>                               Useful Commands for MQ administration<\/p>\n<p>dspmqver :- to display MQ series version<br \/>\ndspmq :- to view all queue managers of MQ series.<br \/>\ncrtmqm :- to create a queue manager<br \/>\nstrmqm :- to start queue manager<br \/>\nrunmqsc :- to enter in to particular queue manager<br \/>\nendmqm :- to end a queue manager<br \/>\ndltmqm :- to delete a queue manager<br \/>\ndspmqcsv :- to display command server<br \/>\nendmqcsv :- to end command server<br \/>\nstrmqcsv :- to start command server<br \/>\nrunmqlsr :- to run listener service<br \/>\nendmqlsr :- to end listener service<br \/>\nrunmqchl :- to run a channel out of queue manager<br \/>\nrunmqdlq :- to execute dead letter handle with the help of rule table<br \/>\nsetmqaut :- to set authorizations for particular objects like queuemanager,queue\u2019s channels, listeners to user or group<br \/>\ndspmqaut :- to display authorization for particular user<br \/>\ndmpmqaut :- to dump authorization for particular user<br \/>\nrunmqchi :- to run a channel initiator for particular queue manager<br \/>\nrunmqtrm :- to run trigger monitor on initiation queue for particular queue manager<br \/>\nrcdmqimg :- to take objects (or) record image of a particular queue manager objects<br \/>\nrcrmqobj :- to recreate the mq objects which are already recorded<\/p>\n<p>                  Useful syntax of RUNMQSC utility for hadling QueueManager<\/p>\n<p>DEFINE :- To define\/create MQ manager objects like queue, Channels, process, and listener.<br \/>\nALTER :- to update or modify the existing objects<br \/>\nDISPLAY :- to view all the properties of a particular object or to Display all objects<br \/>\nDELETE :- to delete created objects<br \/>\nCLEAR :- to clear the message from the queue<br \/>\nEND :- to come out of the queue manager<br \/>\nPING :- to check whether other side channel \/ queue manager is ready to accept our request.<br \/>\nSTART :- to start the particular channel or listener<br \/>\nSTOP :- to stop particular channel or listener<br \/>\nREFRESH :- used to refresh the security every time after giving or executing, set mgr or command for queue manager or object<br \/>\nRESET :- used to reset channel,cluster,queue manager<br \/>\nRESOLVE :- to resolve the channel which is in indoubt state<br \/>\nSUSPEND :- to suspend a queue manager from a cluster environment<br \/>\nRESUME :- to remove a queue manager from a cluster environment<\/p>\n<p> IBM MQ Commands<br \/>\nJuly 27, 2007 at 2:09 am | Posted in MQ, Programming, Technology | 5 Comments<\/p>\n<p>Some simple and useful IBM MQ Commands I found useful for debugging or testing the channels and queues. <\/p>\n<p>Some MQ Commands<\/p>\n<p>Use \u2018mqm&#8217; user<\/p>\n<p>At : \/usr\/mqm\/bin<\/p>\n<p>Connect to Queue Manager<br \/>\nrunmqsc <queue_manager_name><\/p>\n<p>Display Channel info<br \/>\ndis channel(<part_of_channel_name>*)<\/p>\n<p>Display Channel full info<br \/>\ndis chs(<part_of_channel_name>*) all<\/p>\n<p>Check channel is alive<br \/>\nping channel(<channel_name>)<\/p>\n<p>start channel(<channel_name>)<\/p>\n<p>Display Queue Alias Info<br \/>\ndis qa(<part_of_queue_alias_name>*)<\/p>\n<p>dis qa(<queue_alias_name>) all<\/p>\n<p>Display Remote Queue Info<br \/>\ndis qr(<remote_queue_name>) all<\/p>\n<p>Display Local Queue Info<br \/>\ndis ql(<part_of_queue_name>*) curdepth<\/p>\n<p>Display Channel messages info including last message date and time<br \/>\ndis chs(<part_of_queue_name>*) msgs lstmsgda lstmsgti<\/p>\n<p>Zerolize Counter (curdepth) in queue<br \/>\nrunmqsc <queue_manager_name><\/p>\n<p>stop CHANNEL(<channel_name>)<\/p>\n<p>start CHANNEL(<channel_name>)<\/p>\n<p>It should then show zero messages :<br \/>\ndis chs(<channel_name>*) msgs lstmsgda lstmsgti<\/p>\n<p>Perform a test put message<br \/>\ncd \/usr\/mqm\/samp\/bin.\/amqsput <queue_name> <queue_manager_name><\/p>\n<p>Test message <Enter> <\/p>\n<p>Backup the message <\/p>\n<p>1.\tLogon to  \u201csl73cdisapp001\u201d using \u201cmqm\u201d<br \/>\n2.\tcd \/home\/mqm\/admin\/$QMGRNAME\/qload<br \/>\n3.\t.\/BackupAuditMsgs.sh $QMGRNAME                                                    &#8211;              Take backup of messages in the \u201caudit\u201d Q to the \u201cbackup\u201d Q<br \/>\n4.\t.\/RestoreAuditMsgs.sh $QMGRNAME                                                   &#8211;              Restore messages back to \u201cAudit\u201d Q<br \/>\n5.\tCheck the Current depth of the Q.<br \/>\n6.\trunmqsc $QMGRNAME<br \/>\n7.\tdis ql (QNAME) curdepth<\/p>\n<p>Backup messages from a Queue to a file:<br \/>\nCommand: qload \u2013m QM1 \u2013i LQ1 \u2013f c:\\bkpmsg<\/p>\n<p>import messages from a file to the queue:<br \/>\nCommand: qload \u2013m QM1 \u2013o LQ1 \u2013f c:\\bkpmsg<\/p>\n<p>Copying messages from a queue to another queue:<br \/>\nCommand: qload \u2013m QM1 \u2013i LQ1 \u2013o LQ2<\/p>\n<p>======================================<\/p>\n<p>MQ WORKS ON point to point <\/p>\n<p>Assure delivery <\/p>\n<p>Persittance <\/p>\n<p>Fast connection is also open always <\/p>\n<p>\t\tA &#8212;>   B<br \/>\nSender channel          Reciever channel<br \/>\nreciever channel        sender channel<br \/>\nLOCAL QUEUE\t\tLOCAL QUEUE<br \/>\nREMOTE QUEUE<br \/>\nRECIEVER QUEUE          Local QUEUE<br \/>\nPORT 1414               1415<br \/>\nIP = 192.168.1.1         192.168.1.10<\/p>\n<p>MQM <\/p>\n<p>username mqm mqm<\/p>\n<p>AIX  &#8211; ROOT U+G  created  .bff <\/p>\n<p>sol &#8211; root u+g before install manually .pkg <\/p>\n<p>Lin &#8211; root u+g befor installl .rpm<\/p>\n<p>win &#8211; !!! .exe <\/p>\n<p>\/opt\/mqm = is binary placed<\/p>\n<p>\/var\/mqm = we have logs <\/p>\n<p>\t    LIN        SOL           AIX                        WIN<\/p>\n<p>BINARY    \/opt\/mqm  \/opt\/mqm       \/usr\/mqm     D\/ E:\/Program files <\/p>\n<p>runtime  \/var\/mqm   \/var\/mqm       \/var\/mqm      <\/p>\n<p>(Qmgr) <\/p>\n<p>dspmqmver<\/p>\n<p>check the arch<br \/>\ndspmqmver -a<\/p>\n<p>crtmqm<\/p>\n<p>crtmqm TESTQM1<\/p>\n<p>to display<br \/>\ndspmqm <\/p>\n<p>dspmqm    <\/p>\n<p>strmqm TESTQMQ1<\/p>\n<p>endmqm -i TESTQMQ1<\/p>\n<p>dspmqm<\/p>\n<p>cd \/var\/mqm<\/p>\n<p>qm.ini<\/p>\n<p>ps -ef | grep mqlsr <\/p>\n<p>runmqsc TESTQMQ1<\/p>\n<p>display QMGR<\/p>\n<p>dis channel  <\/p>\n<p>dis chl (*)<\/p>\n<p>dis chl(*) where (TYPE EQ SDR)<\/p>\n<p>dis  q(*)<\/p>\n<p>DEFINE LISTENER(TESTQM1.LS1) TRPTYPE (TCP) PORT (21414) <\/p>\n<p>crtmqm TESTQMQ1<\/p>\n<p>DEFINE QLOCAL   (TESTQM1.LOCAL)<\/p>\n<p>Alter  QLOCAL    (TESTQM1.LOCAL) MAXDEPTH(1000)<\/p>\n<p>dis q  (TESTQM1.LOCAL) MAXDEPTH<\/p>\n<p>\t\tA &#8212;>   B <\/p>\n<p>Sender channel  (testqm1.to.testqm2)          Reciever channel  (testqm1.to.testqm2)<br \/>\nreciever channel  (testqm1.to.testqm1)     \t\tsender channel   (testqm2.to.testqm1)<br \/>\nLOCAL QUEUE\t\t\t\t\tLOCAL QUEUE<br \/>\nREMOTE QUEUE             Transmission queue<br \/>\nRECIEVER QUEUE          Local QUEUE<br \/>\nPORT 1414               1415<br \/>\nIP = 192.168.1.1         192.168.1.10<\/p>\n<p>CREATE QM <\/p>\n<p>crtmqm TESTC<\/p>\n<p>define qlocal(TESTCQM2.TQ1) USAGE(XMITQ)<\/p>\n<p>CREATE LISTENER<\/p>\n<p>DEFINE LISTENER(TESTC.LS1) TRPTYPE(TCP) PORT(21418) control (qmgr)<\/p>\n<p>LQ<\/p>\n<p>define qlocal(TESTC.LQ1)<\/p>\n<p>delete qlocal(TESTCQM1.LQ1)  delete the queue manager<\/p>\n<p>TQ<\/p>\n<p>DEFINE qlocal(TESTC.TQ1) USAGE(XMITQ)<\/p>\n<p>SENDER CHANNEL<br \/>\nDEFINE channel(TESTC.TO.TESTD) CHLTYPE(SDR) CONNAME(&#8216;10.211.48.247(21419)&#8217;) XMITQ(&#8216;TESTC.TQ1&#8217;)<\/p>\n<p>DEFINE channel(TESTC.TO.TESTD) CHLTYPE(SDR) CONNAME(&#8216;10.211.48.247(21419)&#8217;) XMITQ(&#8216;TESTC.TQ1&#8217;)<\/p>\n<p>RECEVER CHANNEL<\/p>\n<p>DEFINE channel(TESTD.TO.TESTD) CHLTYPE(RCVR)<\/p>\n<p>DEFINE channel(TESTD.TO.TESTC) CHLTYPE(RCVR)<\/p>\n<p>RQ<\/p>\n<p>define QREMOTE(TESTC.RQ1) RNAME(&#8216;TESTD.LQ1&#8217;) RQMNAME(&#8216;TESTD&#8217;) XMITQ(&#8216;TESTC.TQ1&#8217;)<\/p>\n<p>Test Functinality <\/p>\n<p>dis listener(TESTC.LS1)<br \/>\nping chl(TESTC.TO.TESTD)<br \/>\ndis channel(TESTC.TO.TESTD)<br \/>\ndis channel(TESTA.TO.TESTB)<br \/>\nstart listener(TESTB.LS1)<\/p>\n<p>crtmqm TESTB<br \/>\nDEFINE QLOCAL(TESTB.LQ1)<br \/>\nDEFINE LISTENER(TESTB.LS1) TRPTYPE(TCP) PORT(21415) control (qmgr)<br \/>\nDEFINE qlocal(TESTB.TQ1) USAGE(XMITQ)<br \/>\ndefine QREMOTE(TESTB.RQ1) RNAME(&#8216;TESTA.LQ1&#8217;) RQMNAME(&#8216;TESTA&#8217;) XMITQ(&#8216;TESTB.TQ1&#8217;)<br \/>\nDEFINE channel(TESTA.TO.TESTB) CHLTYPE(RCVR)<br \/>\nDEFINE channel(TESTB.TO.TESTA) CHLTYPE(SDR) CONNAME(&#8216;10.211.48.247(21416)&#8217;) XMITQ(&#8216;TESTB.TQ1&#8217;)<br \/>\ndis listener(TESTB.LS1)<br \/>\nping chl(TESTB.TO.TESTA)<br \/>\ndis channel(TESTB.TO.TESTA)<br \/>\ndis channel(TESTA.TO.TESTB)<br \/>\nstart listener(TESTB.LS1)<\/p>\n<p>Delte QUEUE MANAGER<\/p>\n<p>dltmqm TESTC<br \/>\ndltmqm TESTD<\/p>\n<p>IN CLUSTER<\/p>\n<p>ALLWAYS CREATE RECIEVER <\/p>\n<p>MQ  CLUSETERING <\/p>\n<p>software clustering (Active &#8211; Active)<\/p>\n<p>Active &#8211; Passive <\/p>\n<p>clussdr clusrcvr<\/p>\n<p>we dont have TQ,RQ,SDR CHL  RCR CHL<\/p>\n<p>Full repository and partially Repository <\/p>\n<p>crtmqm clusqm1<br \/>\ncrtmqm clusqm2<\/p>\n<p>strmqm clusqm1<br \/>\nstrmqm clusqm2<\/p>\n<p>define listener(CLUSQM1.LS1) TRPTYPE(TCP) PORT(21414)<\/p>\n<p>Start  listener(CLUSQM1.LS1)<\/p>\n<p>How to clear the messages <\/p>\n<p>clear command<\/p>\n<p>amqsget <\/p>\n<p>dis q(qm4.lq1) curdepth<\/p>\n<p>\/opt\/mqm\/samp\/bin\/amqsget <queue Name> <QM NAME><\/p>\n<p>\/opt\/mqm\/samp\/bin\/amqsgbr <\/p>\n<p>\/opt\/mqm\/samp\/bin\/amqsgbrc <\/p>\n","protected":false},"excerpt":{"rendered":"<p>launch runmqsc<\/p>\n<p>display queue manager(s) display qmmgr(*)<\/p>\n<p>display queue(s) display queue(*)<\/p>\n<p>display channel(s) display channel(*)<\/p>\n<p>display listener(s) display listener(*)<\/p>\n<p>check queue status display qstatus(*)<\/p>\n<p>clear queue clear qlocal(queue_name)<\/p>\n<p>display connections display conn(*)<\/p>\n<p>dspmq runmqsc dis chs (channel) start chl (channel) stop chl (channel) reset chl (channel) start chl (channel) end<\/p>\n<p>Start Q Manager &#8212;&#8212;&#8212;&#8212;&#8212; strmqm [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3678"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3678"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3678\/revisions"}],"predecessor-version":[{"id":4269,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3678\/revisions\/4269"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}