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 » Deleting all Queues at once

Post new topic  Reply to topic
 Deleting all Queues at once « View previous topic :: View next topic » 
Author Message
Atlanta06
PostPosted: Wed Nov 29, 2006 12:00 pm    Post subject: Deleting all Queues at once Reply with quote

Novice

Joined: 29 Nov 2006
Posts: 11

Guys

Is there any way to delete all the queues at the same time? The queues to be deleted include local Q's,XMIT Q's and remote Q's

TIA
Back to top
View user's profile Send private message
rkford11
PostPosted: Wed Nov 29, 2006 12:13 pm    Post subject: Re: Deleting all Queues at once Reply with quote

Partisan

Joined: 06 Jun 2004
Posts: 316

Atlanta06 wrote:
Guys

Is there any way to delete all the queues at the same time? The queues to be deleted include local Q's,XMIT Q's and remote Q's

TIA


Delete the queues folder under the QMGR.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Nov 29, 2006 12:20 pm    Post subject: Re: Deleting all Queues at once Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

rkford11 wrote:
Delete the queues folder under the QMGR.


NO.

That is entirely unsafe.

If you wish to restore a queue manager to a "pristine" state, then delete it and then recreate it.

If you wish to remove a large number of queues, then consider writing an MQSC script file to delete each individual queue.

If you wish to delete all queues other than SYSTEM queues, then ... well, that's a "pristine state" - but you can also write a program that uses PCF messages to get a list of queues and then creates a PCF message to delete each queue from that list that you don't want.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wschutz
PostPosted: Wed Nov 29, 2006 12:31 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

From the MS03 readme:
Quote:
Here's a little script to delete all the queues that begin with AMQ (even the PERMDYN ones):

export QM=WBRK_QM
./saveqmgr.linux -m$QM -s -1 -p -c | grep \(\'AMQ | gawk '{print "delete ql",$3}' | runmqsc $QM



_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
rkford11
PostPosted: Wed Nov 29, 2006 12:32 pm    Post subject: Re: Deleting all Queues at once Reply with quote

Partisan

Joined: 06 Jun 2004
Posts: 316

jefflowrey wrote:
rkford11 wrote:
Delete the queues folder under the QMGR.


NO.

That is entirely unsafe.

If you wish to restore a queue manager to a "pristine" state, then delete it and then recreate it.

If you wish to remove a large number of queues, then consider writing an MQSC script file to delete each individual queue.

If you wish to delete all queues other than SYSTEM queues, then ... well, that's a "pristine state" - but you can also write a program that uses PCF messages to get a list of queues and then creates a PCF message to delete each queue from that list that you don't want.


Thanks Jeff. so its always safe to delete individual queue at a time rather than all at once.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Nov 29, 2006 12:33 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It is never safe to delete a queue using anything other than MQSC or PCF (or the MQExplorer).

It is never possible to delete MORE THAN ONE queue at a time using MQSC or PCF or MQExplorer.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Nov 29, 2006 12:35 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

wschutz wrote:
From the MS03 readme:
Quote:
Here's a little script to delete all the queues that begin with AMQ (even the PERMDYN ones):

export QM=WBRK_QM
./saveqmgr.linux -m$QM -s -1 -p -c | grep \(\'AMQ | gawk '{print "delete ql",$3}' | runmqsc $QM




I tried that on Windows and it didn't work...
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wschutz
PostPosted: Wed Nov 29, 2006 2:15 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

on windows, it's just "saveqmgr", not 'saveqmgr.linux'.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
RogerLacroix
PostPosted: Sat Dec 02, 2006 9:55 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

jefflowrey wrote:
wschutz wrote:
From the MS03 readme:
Quote:
Here's a little script to delete all the queues that begin with AMQ (even the PERMDYN ones):

export QM=WBRK_QM
./saveqmgr.linux -m$QM -s -1 -p -c | grep \(\'AMQ | gawk '{print "delete ql",$3}' | runmqsc $QM

I tried that on Windows and it didn't work...

wschutz wrote:
on windows, it's just "saveqmgr", not 'saveqmgr.linux'.

Also, Windows doesn't have grep or gawk but you can get all the Unix tools / Utilities build natively for Windows called GNU utilities for Win32 from:
http://unxutils.sourceforge.net/

I use them all the time and they work great (and no stupid Cygwin dll or anything else).

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Deleting all Queues 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.