Author |
Message
|
Rock |
Posted: Wed Aug 08, 2007 3:09 am Post subject: Clear a queue......... |
|
|
Novice
Joined: 27 Jul 2007 Posts: 15
|
how to clear all the message in all the queues in a queue manager |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Aug 08, 2007 4:23 am Post subject: |
|
|
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 |
|
 |
Mr Butcher |
Posted: Wed Aug 08, 2007 5:11 am Post subject: |
|
|
 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 |
|
 |
jefflowrey |
Posted: Wed Aug 08, 2007 5:14 am Post subject: |
|
|
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 |
|
 |
Mr Butcher |
Posted: Wed Aug 08, 2007 5:38 am Post subject: |
|
|
 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 |
|
 |
Avikal Jain |
Posted: Wed Aug 08, 2007 6:30 am Post subject: hi |
|
|
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 |
|
 |
dkeister |
Posted: Wed Aug 08, 2007 7:02 am Post subject: |
|
|
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 |
|
 |
Avikal Jain |
Posted: Wed Aug 08, 2007 7:08 am Post subject: hi dkeister |
|
|
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 |
|
 |
UglyAngelX |
Posted: Wed Aug 08, 2007 8:50 am Post subject: Re: hi dkeister |
|
|
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 |
|
 |
|