| Author | Message | 
		
		  | Atlanta06 | 
			  
				|  Posted: Wed Nov 29, 2006 12:00 pm    Post subject: Deleting all Queues at once |   |  | 
		
		  | Novice
 
 
 Joined: 29 Nov 2006Posts: 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 |  | 
		
		  |  | 
		
		  | rkford11 | 
			  
				|  Posted: Wed Nov 29, 2006 12:13 pm    Post subject: Re: Deleting all Queues at once |   |  | 
		
		  | Partisan
 
 
 Joined: 06 Jun 2004Posts: 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 |  | 
		
		  |  | 
		
		  | jefflowrey | 
			  
				|  Posted: Wed Nov 29, 2006 12:20 pm    Post subject: Re: Deleting all Queues at once |   |  | 
		
		  | Grand Poobah
 
 
 Joined: 16 Oct 2002Posts: 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 |  | 
		
		  |  | 
		
		  | wschutz | 
			  
				|  Posted: Wed Nov 29, 2006 12:31 pm    Post subject: |   |  | 
		
		  |  Jedi Knight
 
 
 Joined: 02 Jun 2005Posts: 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 |  | 
		
		  |  | 
		
		  | rkford11 | 
			  
				|  Posted: Wed Nov 29, 2006 12:32 pm    Post subject: Re: Deleting all Queues at once |   |  | 
		
		  | Partisan
 
 
 Joined: 06 Jun 2004Posts: 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 |  | 
		
		  |  | 
		
		  | jefflowrey | 
			  
				|  Posted: Wed Nov 29, 2006 12:33 pm    Post subject: |   |  | 
		
		  | Grand Poobah
 
 
 Joined: 16 Oct 2002Posts: 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 |  | 
		
		  |  | 
		
		  | jefflowrey | 
			  
				|  Posted: Wed Nov 29, 2006 12:35 pm    Post subject: |   |  | 
		
		  | Grand Poobah
 
 
 Joined: 16 Oct 2002Posts: 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 |  | 
		
		  |  | 
		
		  | wschutz | 
			  
				|  Posted: Wed Nov 29, 2006 2:15 pm    Post subject: |   |  | 
		
		  |  Jedi Knight
 
 
 Joined: 02 Jun 2005Posts: 3316
 Location: IBM (retired)
 
 | 
			  
				| on windows, it's just "saveqmgr", not 'saveqmgr.linux'. _________________
 -wayne
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | RogerLacroix | 
			  
				|  Posted: Sat Dec 02, 2006 9:55 am    Post subject: |   |  | 
		
		  |  Jedi Knight
 
 
 Joined: 15 May 2001Posts: 3265
 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 |  | 
		
		  |  | 
		
		  |  |