{"id":4685,"date":"2015-04-28T10:07:24","date_gmt":"2015-04-28T02:07:24","guid":{"rendered":"http:\/\/rmohan.com\/?p=4685"},"modified":"2015-04-28T10:07:24","modified_gmt":"2015-04-28T02:07:24","slug":"startstopdelete-a-queue-manager","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=4685","title":{"rendered":"Start\/Stop\/Delete a Queue Manager"},"content":{"rendered":"<h3>Start\/Stop\/Delete a Queue Manager<\/h3>\n<p><strong><em><span style=\"text-decoration: underline;\">Starting a Queue Manager<\/span><\/em><\/strong><\/p>\n<p>Before we can use a Queue Manager, we need to start it, using the\u00a0<em>STRMQM<\/em>\u00a0command. The command to start a Queue Manager called\u00a0<em>QMA<\/em>\u00a0is:<\/p>\n<p>$ strmqm QMA<\/p>\n<p>You should see output similar to the following on your screen:<\/p>\n<p>WebSphere MQ queue manager &#8216;QMA&#8217; starting.<\/p>\n<p>2108 log records accessed on queue manager &#8216;QMA&#8217; during the log replay phase.<\/p>\n<p>Log replay for queue manager &#8216;QMA&#8217; complete.<\/p>\n<p>Transaction manager state recovered for queue manager &#8216;QMA&#8217;.<\/p>\n<p>WebSphere MQ queue manager &#8216;QMA&#8217; started.<\/p>\n<p><strong><em><span style=\"text-decoration: underline;\">Checking that the Queue Manager is running<\/span><\/em><\/strong><\/p>\n<p>To check that a Queue Manager is active, use the DSPMQ MQ command:<\/p>\n<p>$ dspmq<\/p>\n<p>If the Queue Manager is active it should have a status of &#8220;Running&#8221; as follows:<\/p>\n<p>QMNAME(QMA)\u00a0\u00a0\u00a0\u00a0 STATUS(Running)<\/p>\n<p><strong><em><span style=\"text-decoration: underline;\">Stopping a Queue Manager<\/span><\/em><\/strong><\/p>\n<p>To stop (<em>end<\/em>) a Queue Manager, use the\u00a0<em>ENDMQM<\/em>\u00a0command. This command has four possible parameters:<\/p>\n<ul>\n<li><em>-c<\/em>: Controlled\/quiesced shutdown. This is the default. The queue manager stops, but only after all applications have disconnected. Any calls currently being processed are completed.<\/li>\n<li><em>-w<\/em>: Wait shutdown. This type of shutdown is equivalent to a controlled shutdown except that control is returned to you only after the Queue Manager has stopped. You receive the message Waiting for Queue Manager\u00a0<em>qmName<\/em>\u00a0to end while shutdown progresses.<\/li>\n<li><em>-i<\/em>: Immediate shutdown. The Queue Manager stops after it has completed all the calls currently being processed. Any MQI requests issued after the command has been issued fail. Any incomplete units of work are rolled back when the Queue Manager is next started. Control is returned after the Queue Manager has ended.<\/li>\n<li><em>-p<\/em>: Preemptive shutdown\u2014use this type of shutdown only in exceptional circumstances. For example, when a Queue Manager does not stop as a result of a normal\u00a0<em>endmqm<\/em>\u00a0command. The Queue Manager might stop without waiting for applications to disconnect or for MQI calls to complete.<\/li>\n<\/ul>\n<p>If we want to suppress error messages, then we just have to add the\u00a0<em>\u2013z<\/em>\u00a0parameter to the command.<\/p>\n<p>An example of the command to stop Queue Manager\u00a0<em>QMA<\/em>\u00a0is shown next:<\/p>\n<p>$ endmqm \u2013i QMA<\/p>\n<p><strong><em><span style=\"text-decoration: underline;\">Deleting a Queue Manager<\/span><\/em><\/strong><\/p>\n<p>The command to delete\/drop a Queue Manager is\u00a0<em>DLTMQM<\/em>, but before we can issue that command we need to stop all the Listeners for the Queue Manager and then stop (end) the Queue Manager.<\/p>\n<p>The following command will stop all the Listeners associated with Queue Manager pointed to by the\u00a0<em>\u2013m<\/em>\u00a0flag (<em>QMA<\/em>\u00a0in this example). The\u00a0<em>\u2013w<\/em>\u00a0flag means the command will wait until all the Listeners are stopped before returning control:<\/p>\n<p>$ endmqlsr -w -m QMA<\/p>\n<p>The command to stop (end) the Queue Manager is:<\/p>\n<p>$ endmqm QMA<\/p>\n<p>And fnally the command to delete the Queue Manager is:<\/p>\n<p>$ dltmqm QMA<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Start\/Stop\/Delete a Queue Manager <\/p>\n<p>Starting a Queue Manager<\/p>\n<p>Before we can use a Queue Manager, we need to start it, using the STRMQM command. The command to start a Queue Manager called QMA is:<\/p>\n<p>$ strmqm QMA<\/p>\n<p>You should see output similar to the following on your screen:<\/p>\n<p>WebSphere MQ queue manager &#8216;QMA&#8217; starting.<\/p>\n<p>2108 [&#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\/4685"}],"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=4685"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4685\/revisions"}],"predecessor-version":[{"id":4686,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4685\/revisions\/4686"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}