| Author | Message | 
		
		  | Rahul999 | 
			  
				|  Posted: Fri Jan 16, 2009 12:31 am    Post subject: How to delete queues inside a queue manager |   |  | 
		
		  |  Centurion
 
 
 Joined: 14 Mar 2007Posts: 134
 
 
 | 
			  
				| Hi Friends, 
 I have a queue manager running on windows sever with around 500 queues on it and I want to delete 90% of them.
 Is there any way we can do that ?
 Can we use saveQMgr for that ...but that will return only "Define Queues" ..shud I replace define with delete ?
 
 Is there any other way. .i mean some support pacs or script ?
 javascript:emoticon
 ('
  ') 
 Cheers.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Fri Jan 16, 2009 12:44 am    Post subject: Re: How to delete queues inside a queue manager |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| 
   
	| Rahul999 wrote: |  
	| Can we use saveQMgr for that ...but that will return only "Define Queues" ..shud I replace define with delete ? 
 |  
 I would.
 
 You might be able to knit together a script which picks out individual queues using regex or something, but frankly too much effect IHMO.
 
 If it's that percentage of the queues, another option might be:
 
 - run saveqmgr
 - edit it to contain the 10% of the queues you still  want
 - delete the queue manager
 - recreate the queue manager
 - run the 10% back in
 
 but frankly I'd probably edit the script to delete the 90% and have done.
 _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | mqjeff | 
			  
				|  Posted: Fri Jan 16, 2009 3:46 am    Post subject: |   |  | 
		
		  | Grand Master
 
 
 Joined: 25 Jun 2008Posts: 17447
 
 
 | 
			  
				| I could add an option to ms03 that would generate DELETE/DEFINE pairs instead of DEFINE REPLACE... 
 Would that be helpful?
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | fjb_saper | 
			  
				|  Posted: Fri Jan 16, 2009 4:23 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| I would go for piping output and then editing the resulting file: 
 echo 'dis queue(*)' | runmqsc <QMGR>| grep QUEUE | grep -vf <10%filewithqnames > workfile...
 
 look at the workfile that should contain something like queue name and queue type.
 
 Modify the define to delete and use the qtype to alter the queue to ql, qr, qa etc...
 
 Have fun
  _________________
 MQ & Broker admin
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Mr Butcher | 
			  
				|  Posted: Fri Jan 16, 2009 6:00 am    Post subject: |   |  | 
		
		  |  Padawan
 
 
 Joined: 23 May 2005Posts: 1716
 
 
 | 
			  
				| i would use MO71 supportpac, you can mark the range of objects or single objects and then just "delete" _________________
 Regards, Butcher
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Rahul999 | 
			  
				|  Posted: Sun Jan 18, 2009 6:04 pm    Post subject: |   |  | 
		
		  |  Centurion
 
 
 Joined: 14 Mar 2007Posts: 134
 
 
 | 
			  
				| I used the method suggested by Butcher, and deleted required queues in one go using MO71. Thanx a lot ! Later I will give try to other method as well..
 
 ('
  ') |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |