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 » Clear a queue.........

Post new topic  Reply to topic
 Clear a queue......... « View previous topic :: View next topic » 
Author Message
Rock
PostPosted: Wed Aug 08, 2007 3:09 am    Post subject: Clear a queue......... Reply with quote

Novice

Joined: 27 Jul 2007
Posts: 15

how to clear all the message in all the queues in a queue manager
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Aug 08, 2007 4:23 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Delete the queue manager.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Wed Aug 08, 2007 5:11 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

my first idea was "format the disk" but jefflowrey got a more user friendly version


use your favourite scripting language to code this

Code:
for all qlocal do
  if qlocal.curdepth > 0 then do
     if open-input-count = o & open-output-count = 0 then do
        clear qlocal
     end
     else do
       mqget qlocal until empty
     end
   end
end


or use MO71, it can clear a marked range of queues

you should consider not to clear some system queues (SYSTEM.CHANNEL.SYNCQ for excample, there are others)

you should consider not to create messages that are not needed

you should not be signed on in production
_________________
Regards, Butcher
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Aug 08, 2007 5:14 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You should never touch any SYSTEM.* queues, without knowing exactly what you're doing. Except S.DEAD.LETTER.QUEUE - and even here you need to mostly know what you're doing.

I've always found it more useful to know how MQ works, than to know how MO71 works.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Wed Aug 08, 2007 5:38 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

Quote:
I've always found it more useful to know how MQ works, than to know how MO71 works


right. but sometimes you need a little helper to get things done fast.
of course you should know what you are doing... not only in terms of MQ...
_________________
Regards, Butcher
Back to top
View user's profile Send private message
Avikal Jain
PostPosted: Wed Aug 08, 2007 6:30 am    Post subject: hi Reply with quote

Apprentice

Joined: 25 Jun 2007
Posts: 39
Location: Pune

hey i too have somethin to say


he can use saveqmgr utility since it doesnt take backup of messages

ha
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
dkeister
PostPosted: Wed Aug 08, 2007 7:02 am    Post subject: Reply with quote

Disciple

Joined: 25 Mar 2002
Posts: 184
Location: Purchase, New York

Seems like the original question didn't really give any business context. Hence the 'delete the queue manager', reformatting the disk, and a script to clear all queues do answer the question as asked...

What problem are you trying to solve?
_________________
Dean Keister
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Avikal Jain
PostPosted: Wed Aug 08, 2007 7:08 am    Post subject: hi dkeister Reply with quote

Apprentice

Joined: 25 Jun 2007
Posts: 39
Location: Pune

this is for your kind info

just go step by step

if you want to clear all the queues after mqsc commands saveqmgr is the only thing can be done before deleteing queumanager or even formatting the disk

and y the hell one would go for deleting qmgr and formatting disk it sounds childish and sillly as well

but if you strictly follow mqseries.net i request you to pls formatt the disk whenevr you will have to clear the queues

Back to top
View user's profile Send private message AIM Address Yahoo Messenger
UglyAngelX
PostPosted: Wed Aug 08, 2007 8:50 am    Post subject: Re: hi dkeister Reply with quote

Voyager

Joined: 04 Dec 2001
Posts: 90
Location: BEARS FAN IN STEELER COUNTRY

Avikal Jain wrote:
this is for your kind info

just go step by step

if you want to clear all the queues after mqsc commands saveqmgr is the only thing can be done before deleteing queumanager or even formatting the disk

and y the hell one would go for deleting qmgr and formatting disk it sounds childish and sillly as well

but if you strictly follow mqseries.net i request you to pls formatt the disk whenevr you will have to clear the queues



Sarcasm some people's kids just do not get it
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 » General IBM MQ Support » Clear a 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.