Shutting down a single queue manager

There are three types of shutdown:

In the procedures that follow, we use a sample queue manager name of

QMgr1 and a sample subsystem name of SUBX. Replace these with your own.

 

Planned shutdown

  1. One hour before shutdown, execute:

    RCDMQMIMG OBJ(*ALL) OBJTYPE(*ALL) MQMNAME(QMgr1) DSPJRNDTA(*YES)

  2. To shut down the queue manager, execute:

    ENDMQM MQMNAME(QMgr1) OPTION(*CNTRLD)
    If QMgr1 does not end, the channel or applications are probably busy.

  3. If we need to shut down QMgr1 immediately, execute the following:

    ENDMQM MQMNAME(QMgr1) OPTION(*IMMED)
    ENDCCTJOB(*YES) TIMEOUT(15)

 

Unplanned shutdown

  1. To shut down the queue manager, execute:

    ENDMQM MQMNAME(QMgr1) OPTION(*IMMED)
    If QMgr1 does not end, the channel or applications are probably busy.

  2. If we need to shut down QMgr1 immediately, execute the following:

    ENDMQM MQMNAME(QMgr1) OPTION(*IMMED)
    ENDCCTJOB(*YES) TIMEOUT(15)

 

Shutdown under abnormal conditions

  1. To shut down the queue manager, execute:

    ENDMQM MQMNAME(QMgr1) OPTION(*IMMED)
    If QMgr1 does not end, continue with step 3 providing that:

    • QMgr1 is in its own subsystem, or

    • We can end all queue managers that share the same subsystem as QMgr1. Use the unplanned shutdown procedure for all such queue managers.

  2. When you have taken all the steps in the procedure for all the queue managers sharing the subsystem (

    SUBX in our examples), execute:

    ENDSBS SUBX *IMMED
    If this command fails to complete, shut down all queue managers, using the unplanned shutdown procedure, and IPL your machine.
    Warning

    Do not use

    ENDJOBABN for MQSeries or WebSphere MQ jobs that fail to end as result of

    ENDJOB or ENDSBS, unless you are prepared to IPL your machine immediately after.

  3. Start the subsystem by executing:

    STRSBS SUBX

  4. Shut the queue manager down immediately, by executing:

    ENDMQM MQMNAME(QMgr1) OPTION(*IMMED)
    ENDCCTJOB(*YES) TIMEOUT(10)

  5. Restart the queue manager by executing:

    STRMQM MQMNAME(QMgr1)

    If this fails, and you:

    • Have restarted your machine with an IPL, or

    • Have only a single queue manager

    Tidy up MQSeries or WebSphere MQ shared memory by executing:

    ENDMQM MQMNAME(*ALL) OPTION(*IMMED)
    ENDCCTJOB(*YES) TIMEOUT(15)

    before repeating step 5.

    If the queue manager restart takes more than a few seconds, WebSphere MQ will add status messages intermittently to the job log detailing the start up progress. For more information on these messages see WebSphere MQ Messages.

    If you still have problems restarting your queue manager, contact IBM support. Any further action you might take could damage the queue manager, leaving MQSeries or WebSphere MQ unable to recover.