Author |
Message
|
sakthi_sarathi |
Posted: Fri Apr 24, 2009 12:58 am Post subject: How to clear local queue |
|
|
 Novice
Joined: 07 Dec 2008 Posts: 16
|
Hi,
how to clear local queue when publisher(OPPROCS) connected. Is there force option to do that?
when i try normal clear option i am getting [AMQ8148: WebSphere MQ object in use.]
Thanks,
Sakthi |
|
Back to top |
|
 |
Vitor |
Posted: Fri Apr 24, 2009 1:05 am Post subject: Re: How to clear local queue |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sakthi_sarathi wrote: |
how to clear local queue when publisher(OPPROCS) connected. Is there force option to do that?
|
Later versions of Explorer or any other tool that uses a get rather than a clear will do it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
gunter |
Posted: Fri Apr 24, 2009 1:07 am Post subject: |
|
|
Partisan
Joined: 21 Jan 2004 Posts: 307 Location: Germany, Frankfurt
|
If the queue is not open exclusive, you are able to get messages.
MQ Explorer has an option "Queue will be cleared using MQGET API calls" _________________ Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3 |
|
Back to top |
|
 |
sakthi_sarathi |
Posted: Fri Apr 24, 2009 1:51 am Post subject: |
|
|
 Novice
Joined: 07 Dec 2008 Posts: 16
|
basically need to purge the messages in local queue, since there was a OPPROCS connection it is not allowing to clear the queue.
I logged into QManager, it seems clear command doesn't have FORCE option like alert/reset...  |
|
Back to top |
|
 |
ramkumarm83 |
Posted: Fri Apr 24, 2009 1:55 am Post subject: |
|
|
Apprentice
Joined: 16 May 2007 Posts: 27
|
Hi,
AFIK, If the queue is connected with any other application, you have to stop the application and clear a queue using CLEAR QLOCAL(Queue_name) command.
Thanks. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Apr 24, 2009 1:56 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sakthi_sarathi wrote: |
I logged into QManager, it seems clear command doesn't have FORCE option like alert/reset...  |
No, it doesn't. If you read the responses you'll see some alternatives from myself and others.
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sakthi_sarathi |
Posted: Fri Apr 24, 2009 2:12 am Post subject: If the queue is connected with any other application, you ha |
|
|
 Novice
Joined: 07 Dec 2008 Posts: 16
|
Is there any way to identify and kill that connection from Qmanager side. App SVRCONN channel is connected with many other queues in this Qmanager.
I know if we stop the SVRCONN channel we can clear. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Apr 24, 2009 2:15 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
You can stop the channel. Or identify the application and stop that (on the box it's running on obviously, and terminiating the app using OS rather than WMQ commands). _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sakthi_sarathi |
Posted: Fri Apr 24, 2009 2:43 am Post subject: |
|
|
 Novice
Joined: 07 Dec 2008 Posts: 16
|
Thanks for all your comments!
found some alternate way and managed to clear that queue. (i.e)altered queue property to disable put and that allows to clear the queue.
Once again thanks all... |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Apr 24, 2009 2:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
sakthi_sarathi wrote: |
Thanks for all your comments!
found some alternate way and managed to clear that queue. (i.e)altered queue property to disable put and that allows to clear the queue.
Once again thanks all... |
You do realize of course that you were quite lucky here.
The application must have closed the queue when receiving the put not allowed. Not all apps are so well behaved...
In order not to impact the application you should have used one of the suggested methods (using get to clear the queue). Only those were not command line based or available in runmqsc ....  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Sam Uppu |
Posted: Fri Apr 24, 2009 6:02 am Post subject: Re: If the queue is connected with any other application, yo |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
sakthi_sarathi wrote: |
Is there any way to identify and kill that connection from Qmanager side. App SVRCONN channel is connected with many other queues in this Qmanager.
I know if we stop the SVRCONN channel we can clear. |
You can do a dis qstatus(qname) type(handle) all,
You will see the PID which you can grep for it and kill.
Thanks. |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Fri Apr 24, 2009 6:23 am Post subject: Re: If the queue is connected with any other application, yo |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
Sam Uppu wrote: |
You will see the PID which you can grep for it and kill.
Thanks. |
And then spend the next few days fixing the application that was blindly killed, but at least you cleared your queue  |
|
Back to top |
|
 |
Sam Uppu |
Posted: Fri Apr 24, 2009 8:07 am Post subject: Re: If the queue is connected with any other application, yo |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
WMBDEV1 wrote: |
Sam Uppu wrote: |
You will see the PID which you can grep for it and kill.
Thanks. |
And then spend the next few days fixing the application that was blindly killed, but at least you cleared your queue  |
Yes. that will be there if we kill any of the PIDs. That is why it is better to bring down the app if possible. Otherwise, try stopping the channels and try to clear the queue.
Thanks. |
|
Back to top |
|
 |
AnAtomist.NoElectrons |
Posted: Tue Mar 25, 2014 2:08 pm Post subject: How to clear a queue in use and GET disabled |
|
|
Newbie
Joined: 11 Mar 2014 Posts: 4
|
Hi,
I have a queue that is in use. I cannot stop the channel as there are other queues as well. The queue is GET disabled so that apps will not get the current messages that are a result of test fanout, which should be discarded when the real messages are channeled. These messages will accumulate until next maintenance window on the weekend. At the time of maintenance, I will deploy another app that will also read from the queue (a shutdown and restart of QMgr is needed). I am not able to CLEAR the queue as it is complaining about object in use. I can not GET messages because the queue is GET disabled. As soon as I deploy new app and restart the QMgr, I should have a clean queue and GET enabled. This is in production environment. Please help.
Thanks,
Anatomist |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Mar 25, 2014 2:48 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
If the object is in use, find out what app is using has the queue open, and terminate that app. Once there are no more apps using the queue, try again to clear the queue. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
|