Author |
Message
|
ipmqadm |
Posted: Mon Jun 30, 2008 11:23 am Post subject: Clearing a local queue on Windows 2003 server |
|
|
Acolyte
Joined: 18 Apr 2007 Posts: 68
|
I have a web application that is dumping thousands of rows into a local queue and need to be able to clear all the records in the queue from time to time. PQEDIT will only allow me to clear about 1,000 rows at a time.
Is there any way to clear all the rows from an MQ v6.0 queue even if it contains tens of thousands of rows? |
|
Back to top |
|
 |
sami.stormrage |
Posted: Mon Jun 30, 2008 12:44 pm Post subject: re |
|
|
 Disciple
Joined: 25 Jun 2008 Posts: 186 Location: Bangalore/Singapore
|
I used to clear the Q's with a program called "get150k" if there were applications still connected to the queue in my admin days(never bothered to check if it was a user written code or IBM provided it ). A simple 'amqsget' should work if there aren't any applications still connected. _________________ *forgetting everything * |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Jun 30, 2008 1:31 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
If there aren't any applications connected a simple runmqsc command to clear the queue is the fasted, easiest way to remove all messages in one shot.
Code: |
runmqsc MY.QM.NAME
CLEAR QLOCAL MY.QUEUE.NAME |
_________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
AkankshA |
Posted: Mon Jun 30, 2008 11:14 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
amqsget shall be of help too..
(you might need to increase the buffer size... ) _________________ Cheers |
|
Back to top |
|
 |
exerk |
Posted: Mon Jun 30, 2008 11:17 pm Post subject: Re: re |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
sami.stormrage wrote: |
...A simple 'amqsget' should work if there aren't any applications still connected. |
Not forgetting to add the ACCEPT_TRUNCATED_MSG option if they're over 100bytes in size, which is the buffer size passed in the sample. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Jul 01, 2008 8:19 pm Post subject: Re: Clearing a local queue on Windows 2003 server |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
ipmqadm wrote: |
Is there any way to clear all the rows from an MQ v6.0 queue even if it contains tens of thousands of rows? |
MQ Visual Edit can clear a queue of all of its messages with only a couple of clicks.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
|