Shutting down all queue managers for IBM MQ for IBM i
Use this information to understand the 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
- One hour before shutdown, execute:
Repeat this for every queue manager that you want to shut down.RCDMQMIMG OBJ(*ALL) OBJTYPE(*ALL) MQMNAME(QMgr1) DSPJRNDTA(*YES) - To shut down the queue manager, execute:
Repeat this for every queue manager that you want to shut down; separate commands can run in parallel.ENDMQM MQMNAME(QMgr1) OPTION(*CNTRLD)If any queue manager does not end within a reasonable time (for example 10 minutes), proceed to step 3.
- To shut down all queue managers immediately, execute the following:
ENDMQM MQMNAME(*ALL) OPTION(*IMMED) ENDCCTJOB(*YES) TIMEOUT(15)
Unplanned shutdown
- To shut down a queue manager, execute:
Repeat this for every queue manager that you want to shut down; separate commands can run in parallel.ENDMQM MQMNAME(QMgr1) OPTION(*IMMED)If queue managers do not end, the channel or applications are probably busy.
- If you need to shut down the queue managers immediately, execute the following:
ENDMQM MQMNAME(*ALL) OPTION(*IMMED) ENDCCTJOB(*YES) TIMEOUT(15)
Shut down under abnormal conditions
- To shut down the queue managers, execute:
Repeat this for every queue manager that you want to shut down; separate commands can run in parallel.ENDMQM MQMNAME(QMgr1) OPTION(*IMMED) - End the subsystems (
SUBXin our examples), by executing:
Repeat this for every subsystem that you want to shut down; separate commands can run in parallel.ENDSBS SUBX *IMMEDIf this command fails to complete, perform an IPL on your system.
Warning: Do not useENDJOBABNfor jobs that fail to end as result ofENDJOBorENDSBS, unless you are prepared to perform an IPL on your system immediately after. - Start the subsystems by executing:
Repeat this for every subsystem that you want to start.STRSBS SUBX - Shut the queue managers down immediately, by executing:
ENDMQM MQMNAME(*ALL) OPTION(*IMMED) ENDCCTJOB(*YES) TIMEOUT(15) - Restart the queue managers by executing:
Repeat this for every queue manager that you want to start.STRMQM MQMNAME(QMgr1)If any queue manager restart takes more than a few seconds IBM® MQ will show status messages intermittently detailing the startup progress.
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 IBM MQ unable to recover.