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 get disabled queue

Post new topic  Reply to topic
 Clearing get disabled queue « View previous topic :: View next topic » 
Author Message
guest468
PostPosted: Mon Aug 04, 2008 7:34 am    Post subject: Clearing get disabled queue Reply with quote

Centurion

Joined: 30 May 2006
Posts: 146
Location: NY

Hi,
I was trying to clear a queue using 'clear ql' command but actually the queue was get disabled but still I could clear it successfully. So wondering how it worked? It looks like it is not using MQGET MQI call?

Thanks
Back to top
View user's profile Send private message
Gaya3
PostPosted: Mon Aug 04, 2008 8:05 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

there are 2 ways of clearing:

one is by using MQGET and another by CLEAR MQSC command

if you use CLEAR command, it does/clear it, though it is GET Disabled.

but if you try MQGET , it will prompt an error.
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
Gaya3
PostPosted: Mon Aug 04, 2008 8:07 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

Extract from docs:

Quote:
If you use the CLEAR command, all of the messages are cleared from the queue. However, if the queue is already opened exclusively by another application or if the queue contains uncommitted messages, the command fails immediately and none of the messages are cleared.

If you use the MQGET API call, the messages are got from the queue until no more messages are available. However, MQGET does not recognize uncommitted messages, which means that there could still be uncommitted messages on the queue. Also, the command might fail if the queue is already exclusively opened by another application

_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
AkankshA
PostPosted: Mon Aug 04, 2008 8:11 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

yes it does not...

infact if you see the v6 MQExplorer.. while clearing the messages you get two options
1) using clear command and 2) using MQGET..

so its quite implicit that CLEAR command does not use MQGET internally...
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
zpat
PostPosted: Mon Aug 04, 2008 11:31 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

If you want to remove messages from a queue with MQGET, you can get disable in alias queue for the application and use another alias (or the underlying local queue) to remove messages.
Back to top
View user's profile Send private message
sami.stormrage
PostPosted: Mon Aug 04, 2008 11:55 pm    Post subject: Reply with quote

Disciple

Joined: 25 Jun 2008
Posts: 186
Location: Bangalore/Singapore

@above
Wow.. :O that was a really great piece of info. I tot aliases could be used for bypassing security apart from their normal task.
_________________
*forgetting everything *
Back to top
View user's profile Send private message Yahoo Messenger
guest468
PostPosted: Thu Aug 07, 2008 7:36 am    Post subject: Reply with quote

Centurion

Joined: 30 May 2006
Posts: 146
Location: NY

Thanks guys for the info.
Actually I was trying to figure out what CLEAR command does internally if not MQGET. Does it directly manipulate the queue file in some way?
Actually I am trying to figure out if it is possible to simulate this command from MQ program or so and clear it even if there is an open handle.
Thanks.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Thu Aug 07, 2008 4:26 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

CLEAR QLOCAL must be used with caution on queues which have queue depth events enabled.

If the queue depth low event is enabled, the event will not be generated if the queue depth decreases through the low depth threshold on its way to zero. If the queue depth full event had previously occurred this will leave the queue depth high event disabled. This could lead to the situation where the queue depth could later increase to the point of the queue being full, but the queue depth high event would not have occurred along the way.
_________________
Glenn
Back to top
View user's profile Send private message
markt
PostPosted: Thu Aug 07, 2008 5:33 pm    Post subject: Reply with quote

Knight

Joined: 14 May 2002
Posts: 508

Quote:
if the queue depth low event is enabled, the event will not be generated


not true since V6 - CLEAR generates same events as if you'd done mutiple MQGETs.
Back to top
View user's profile Send private message
AkankshA
PostPosted: Fri Aug 08, 2008 3:42 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

markt wrote:
Quote:
if the queue depth low event is enabled, the event will not be generated


not true since V6 - CLEAR generates same events as if you'd done mutiple MQGETs.


hmm... IIRC Clear option was added in v6 only..
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
PeterPotkay
PostPosted: Fri Aug 08, 2008 3:52 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Its been available for multiple versions. The MQ 5.1 manuals have it:
http://publibfp.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/csqzaj05/2.10?DT=20001005131255
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Aug 08, 2008 4:14 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Also, it is best if you assume that everything posted by markt is correct.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Sun Aug 10, 2008 8:01 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

markt wrote:
Quote:
if the queue depth low event is enabled, the event will not be generated


not true since V6 - CLEAR generates same events as if you'd done mutiple MQGETs.


ok. My test was under MQ 5.3 about 4 years ago. I just retested on MQ 7.0 and it does generate queue depth low events on CLEAR QLOCAL. It must have been fixed since then! My apologies.
_________________
Glenn
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 » Clearing get disabled 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.