Solved

stop/start mq environment

Posted on 2009-05-10
7
5,107 Views
Last Modified: 2013-12-11
what are the best practices to stop/start mq environment.
what needs to be stopped/started first - QM, channel or listener or anything else ?
what happens to messages that are in flight during stop process?
please provide the answer for both clustered and none-clustered environments.
thanks
0
Comment
Question by:wasadmin770
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
7 Comments
 
LVL 41

Expert Comment

by:HonorGod
ID: 24356195
Q: What are the best practices to for stopping/starting an MQ environment?
A: 1. Stop all WebSphere Application Server application on the machine(s) and any applications accessing remote resources.
    2. End all MQ activity:
        - Log in as a user authorized in the mqm group
        - Use the dspmq command to display the state of all the queue managers on the system.
        - Use the endmqm command to stop all running queue managers.
        - Stop any listeners associated with the queue managers, using the command:
           * Use "endmqlsr -m QMgrName"
           * To check that you have stopped all necessary WebSphere MQ activity, type:
             => ps -ef | grep mq
           * Check that there are no processes listed that are running command lines beginning amq or runmq. Ignore any that start with amqi.

I'm pretty sure that the stopping order is documented here:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.amq1ac.doc/lq10880_.htm

For starting, use the reverse process.  i.e., start MQ, and then WebSphere and other applications

Start command: strmqm QMgrName

It is strongly encouraged to use the MQ Listeners as objects inside the QMgr (this was introduced in V6)

Here is the WebSphere MQ V6 Fundamentals document
http://www.redbooks.ibm.com/abstracts/SG247128.html?Open

See page 269.
1. Create a listener that is started and stopped automatically with the queue
manager by issuing the following MQSC command against host1/echo.hub:
DEFINE LISTENER('LISTENER.TCP') +
TRPTYPE(TCP) PORT(9001) CONTROL(QMGR) +
DESCR('TCP/IP Listener for queue manager')
2. Start the listener using the following MQSC command:
START LISTENER('LISTENER.TCP')

For MQ clustered environments, first stop the Partial repositories, then the Full ones.

Q: What about inflight messages?
A: If the queue manager is asked "nicely" to stop while there are inflight transactions, then the queue manager will NOT stop until the transaction is rolled back or committed.
However if the queue manager is FORCED to stop, then the inflight transactions will be rolled back and this information will be in the MQ recovery logs.

Depending on how the queue manager was forced to stop, then during the restart, the queue manager will try to recover from the recovery logs. It will not begin the transaction that was rolled back.

Hopefully this helps.
0
 

Author Comment

by:wasadmin770
ID: 24366870
please elaborate more on what you mean by "if the queue manager is asked "nicely" to stop" and
"if the queue manager is FORCED to stop". which commands you meant?
also what about stopping/starting channels?
thanks
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 24366939
A"nice" stop is one where the queue manager is given time to deal with the pending operations.

A "hard" or "forced" stop basically says "stop, right now!  I don't care what you are in the middle of, just stop it!".

ok?
0
Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

 

Author Comment

by:wasadmin770
ID: 24370873

i understand the differerence. the question was - what is the actuall syntax for these 2
approaches.
also do i need to stop/start channels as well?
thanks
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 24371215
Ah, sorry for the misunderstanding... I'll have to check on that tomorrow, and get back to you.
0
 
LVL 41

Accepted Solution

by:
HonorGod earned 500 total points
ID: 24373372
To stop a QueueManager, use the endmqm command.

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.amqzag.doc/fa15800_.htm

The text from which states:

Syntax:

endmqm [option] QueueName

Options:
  -c = controlled (default)
         This is the "nice" version of the stop.  The queue manager is stopped only after all applications have disconnected.

  -w = wait
         This is another "nice" shutdown.  Control is returned only after the queue manager is stopped.

  -i = immediate
        The queue manager stops after it has completed all the MQI 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.

  -p = preemptive
         Warning: Use this type of shutdown only in exceptional circumstances.
         For example, when a queue manager does not stop as a result of a normal endmqm command.

The queue manager might stop without waiting for applications to disconnect or for MQI calls to complete. This can give unpredictable results for WebSphere® MQ applications. The shutdown mode is set to immediate shutdown. If the queue manager has not stopped after a few seconds, the shutdown mode is escalated, and all remaining queue manager processes are stopped.

The effect on any client applications connected through a server-connection channel is equivalent to a STOP CHANNEL command issued in TERMINATE mode.
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 24380287
Thanks for the grade & points

Good luck & have a great day
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question