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 » Clearing a local queue on Windows 2003 server

Post new topic  Reply to topic
 Clearing a local queue on Windows 2003 server « View previous topic :: View next topic » 
Author Message
ipmqadm
PostPosted: Mon Jun 30, 2008 11:23 am    Post subject: Clearing a local queue on Windows 2003 server Reply with quote

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
View user's profile Send private message
sami.stormrage
PostPosted: Mon Jun 30, 2008 12:44 pm    Post subject: re Reply with quote

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
View user's profile Send private message Yahoo Messenger
PeterPotkay
PostPosted: Mon Jun 30, 2008 1:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
AkankshA
PostPosted: Mon Jun 30, 2008 11:14 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
exerk
PostPosted: Mon Jun 30, 2008 11:17 pm    Post subject: Re: re Reply with quote

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
View user's profile Send private message
RogerLacroix
PostPosted: Tue Jul 01, 2008 8:19 pm    Post subject: Re: Clearing a local queue on Windows 2003 server Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Clearing a local queue on Windows 2003 server
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.