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 » IBM MQ Installation/Configuration Support » How to clear all Queues in a Queue Manager at Once?

Post new topic  Reply to topic
 How to clear all Queues in a Queue Manager at Once? « View previous topic :: View next topic » 
Author Message
kshah
PostPosted: Tue Feb 20, 2007 7:55 am    Post subject: How to clear all Queues in a Queue Manager at Once? Reply with quote

Novice

Joined: 13 Jun 2005
Posts: 23

Is it possible to clear al the queues of partiular queue manager on WINDOWS machine?

If no...is there a workaround to this problem.

Also i wud like to delete all the queue in QM in one command.

is it possible?

also on runmqsc i m trying command like
display qlocal(*) where(q_name EQ BRK_*)

when i run above command iit gives a syntax error..

My requirement is to get a list of al local queues begining wit 'BRK_'

Thanks in advacne
Kshah
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Feb 20, 2007 8:01 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

There's the CLEAR QLOCAL command. AFAIK it won't take a wildcard for safety reasons (I stand to be corrected here) but you could write a little script that reads all the queue names and runs a CLEAR QLOCAL for each of them. Or do the same with PCF commands.

I think your filter condition needs to be in quotes. I stand to be corrected on that as well.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Feb 20, 2007 8:02 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can delete all the queues on a qmgr with "dltmqm".

You can only clear a single queue at a time, and only if nobody has it open. Otherwise, you can only remove each individual message on one queue at a time.

You also appear to be confusing "EQ" with "LIKE", and misunderstanding what the "*" in "ql(*)" means.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Feb 20, 2007 8:10 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Quote:
Is it possible to clear al the queues of partiular queue manager on WINDOWS machine?


Not a good idea unless you mean application queues only and NOT System Queues, this includes deleting all queues. It can be done by piping in a list of commands via runmqsc.

Quote:
also on runmqsc i m trying command like
display qlocal(*) where(q_name EQ BRK_*)


Try

Quote:
display ql(BRK_*)


Hope this helps
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
143313188
PostPosted: Tue Feb 20, 2007 9:10 pm    Post subject: possible to clear all queues of QMGR Reply with quote

Novice

Joined: 15 Feb 2007
Posts: 22
Location: india

by using script you can clear the all queues of QMGR.
_________________
hi to all.
Back to top
View user's profile Send private message
kevinf2349
PostPosted: Wed Feb 21, 2007 5:46 am    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

OK...I'll bite.

Why would you want to do this? I assume that this is a test queue manager? As previously mentioned this is not good practice....especially if you don't exclude the SYSTEM. queues from the mix.

If messages are non-persistent you could just restart the queue manager and that may clear lots of messages.

I would also recommend that if you do decide to go ahead and do this that you lock the script away from inadvertant use later on....nothing is more certain to get the oft heard cry of 'MQ lost my messages' than someone running your script to 'see what it did'.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » How to clear all Queues in a Queue Manager at Once?
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.