Shutting down all queue managers

There are three types of shutdown:

The procedures are almost the same as for a single queue manager, but using

*ALL instead of the queue manager name where possible, and otherwise using a command repeatedly using each queue manager name in turn. Throughout the procedures, 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)
    Repeat this for every queue manager that you want to shut down.

  2. To shut down the queue manager, execute:

    ENDMQM MQMNAME(QMgr1) OPTION(*CNTRLD)
    Repeat this for every queue manager that you want to shut down; separate commands can run in parallel.

    If any queue manager does not end within a reasonable time (for example 10 minutes), proceed to step 3.

  3. To shut down all queue managers immediately, execute the following:

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

 

Unplanned shutdown

  1. To shut down a queue manager, execute:

    ENDMQM MQMNAME(QMgr1) OPTION(*IMMED)
    Repeat this for every queue manager that you want to shut down; separate commands can run in parallel.

    If queue managers do not end, the channel or applications are probably busy.

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

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

 

Shutdown under abnormal conditions

  1. To shut down the queue managers, execute:

    ENDMQM MQMNAME(QMgr1) OPTION(*IMMED)
    Repeat this for every queue manager that you want to shut down; separate commands can run in parallel.

  2. End the subsystems (

    SUBX in our examples), by executing:

    ENDSBS SUBX *IMMED
    Repeat this for every subsystem that you want to shut down; separate commands can run in parallel.

    If this command fails to complete, 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 subsystems by executing:

    STRSBS SUBX
    Repeat this for every subsystem that you want to start.

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

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

  5. Restart the queue managers by executing:

    STRMQM MQMNAME(QMgr1)
    Repeat this for every queue manager that you want to start.

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

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