ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » How to clear local queue

Post new topic  Reply to topic Goto page 1, 2  Next
 How to clear local queue « View previous topic :: View next topic » 
Author Message
sakthi_sarathi
PostPosted: Fri Apr 24, 2009 12:58 am    Post subject: How to clear local queue Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Apr 24, 2009 1:05 am    Post subject: Re: How to clear local queue Reply with quote

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
View user's profile Send private message
gunter
PostPosted: Fri Apr 24, 2009 1:07 am    Post subject: Reply with quote

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
View user's profile Send private message
sakthi_sarathi
PostPosted: Fri Apr 24, 2009 1:51 am    Post subject: Reply with quote

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
View user's profile Send private message
ramkumarm83
PostPosted: Fri Apr 24, 2009 1:55 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Apr 24, 2009 1:56 am    Post subject: Reply with quote

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
View user's profile Send private message
sakthi_sarathi
PostPosted: Fri Apr 24, 2009 2:12 am    Post subject: If the queue is connected with any other application, you ha Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Apr 24, 2009 2:15 am    Post subject: Reply with quote

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
View user's profile Send private message
sakthi_sarathi
PostPosted: Fri Apr 24, 2009 2:43 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Fri Apr 24, 2009 2:59 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Sam Uppu
PostPosted: Fri Apr 24, 2009 6:02 am    Post subject: Re: If the queue is connected with any other application, yo Reply with quote

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
View user's profile Send private message
WMBDEV1
PostPosted: Fri Apr 24, 2009 6:23 am    Post subject: Re: If the queue is connected with any other application, yo Reply with quote

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
View user's profile Send private message
Sam Uppu
PostPosted: Fri Apr 24, 2009 8:07 am    Post subject: Re: If the queue is connected with any other application, yo Reply with quote

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
View user's profile Send private message
AnAtomist.NoElectrons
PostPosted: Tue Mar 25, 2014 2:08 pm    Post subject: How to clear a queue in use and GET disabled Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Tue Mar 25, 2014 2:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General IBM MQ Support » How to clear local queue
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.