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 » Multiphase Commit » removing large number of uncommitted messages from a queue

Post new topic  Reply to topic
 removing large number of uncommitted messages from a queue « View previous topic :: View next topic » 
Author Message
boos
PostPosted: Fri Nov 04, 2022 4:22 am    Post subject: removing large number of uncommitted messages from a queue Reply with quote

Apprentice

Joined: 27 Jan 2004
Posts: 34
Location: Netherlands

Hello,

I've got 709 uncommitted messages on a queue.
the culprit application has been stopped and there are no more handles on the queue. So MQ is patiently awaiting the confirmation of the external transaction manager (which will never come).

so there I am with 709 uncommitted messages on a queue.
When I have only a few uncom messages I use the dspmqtrn en rsvmqtrn commando's to find the trx-id and then either commit or backout individual transactions. But with 709 messages this is a bit time consuming.
I already did a rsvmqtrn -a (as -a is the only option without an individual trx-id)

I thought of deleting the queue en redefining it, but MQ won't let me because of the uncomitted messages (maybe the transactions log would become corrupt or something).
And stopping of the queuemanager would probably release the transactions (but i'm not willing to stop the entire queuemanager just for this purpose)

Seems that I should script something from the output of the dspmqtrn command and feed that into the rsvmqtrn command. Anyone already done a script like that ? (suggestions are welcome)

I did see this topic http://www.mqseries.net/phpBB/viewtopic.php?t=54058&sid=0e4e2dff328c36c059f85c971b33f941 (from2010) where Bruce2359 suggested on deleting the disc object of the queue. I'd rather not do that unless the transaction logs are released as well (which i doubt).

Are there any other options ?

kind regards
Boos
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Nov 04, 2022 6:08 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

(I’ve always known that one day my past would catch up to me.)

Other than having 709 uncommitted messages orphaned in a queue, is anyone complaining about 709 missing business transactions? If not, then is your concern one of ‘cleanliness is next to Godliness?’
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
boos
PostPosted: Fri Nov 04, 2022 6:37 am    Post subject: Reply with quote

Apprentice

Joined: 27 Jan 2004
Posts: 34
Location: Netherlands

> is anyone complaining about 709 missing business transactions?
They're aware of them and explicitly asked to remove them.

>If not, then is your concern one of ‘cleanliness is next to Godliness?’
partly but mostly it's the issue that the queue displays that there are 709 messages while in reality there are non (as it should be)
Back to top
View user's profile Send private message
boos
PostPosted: Fri Nov 04, 2022 7:46 am    Post subject: Reply with quote

Apprentice

Joined: 27 Jan 2004
Posts: 34
Location: Netherlands

A colleague that has more excel skills than I has provided the solution

so the file I got with dspmqtrn
dspmqtrn -m {queuemanager} -q > MQtrxFile.txt

which was filtered in excel to only contains those transactions that contained the object (=queue) I had to clear. This is how it is done in excell.
paste the output in excell
delete alle space (search/replace all space by nothing)
and filter column A on 'TranNum' Or 'Object({queuename}'

get rid of the lines TranNum that don't have the Object({queuename} in the next line
and then adjust the filter on only TranNum and put the right text in front: rsvmqtrn -m {queuemanager} -b {the excell output TranNum}
Cut and paste in a file and we got a cmd file that backout those transactions that are related to the specific queue.
all my UNCOM messages are gone from the queue
Back to top
View user's profile Send private message
bruce2359
PostPosted: Sat Nov 05, 2022 12:40 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Microsoft Excel to the rescue.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Mon Nov 07, 2022 6:58 pm    Post subject: Reply with quote

Jedi

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

Excel? A short UNIX shell script or PowerShell script would have been appropriate.
_________________
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 » Multiphase Commit » removing large number of uncommitted messages from 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.