Author |
Message
|
mqkrishna2010 |
Posted: Wed May 07, 2014 8:15 am Post subject: Altering more than one xmitq at a time |
|
|
Newbie
Joined: 10 Feb 2014 Posts: 4
|
Hello,
I need a small information in altering queues.
I have 150 xmitqs in my organization.
I want to change maxmsgl property for all xmitqs as 100MB
Insted of altering each and every xmitq, Is there any way to alter all the xmitqs attribute as 100MB at a time
Kindly help me If any body has any clue about this please guide this |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 07, 2014 8:33 am Post subject: Re: Altering more than one xmitq at a time |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqkrishna2010 wrote: |
Insted of altering each and every xmitq, Is there any way to alter all the xmitqs attribute as 100MB at a time |
If you're looking for something like
Code: |
ALTER QLOCAL(*) MAXMSGL(104758674) WHERE USAGE = 'XMITQ' |
it doesn't exist.
You can fairly easily write a script to locate all the XMITQs and then update them to avoid you altering 150 queues, but even the script still has to do it one at a time.
Alternatively, if your site has followed best practice and built these 150 queues from scripts in the first place, you can quickly leverage those for your task. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqkrishna2010 |
Posted: Thu May 08, 2014 7:47 am Post subject: |
|
|
Newbie
Joined: 10 Feb 2014 Posts: 4
|
Hi,
I am exactly looking what you guess.
I have tried script also before posting this, but in scripting also we have to mention one alter statement for each and every queue.
This will take very large time.
Thank you for your response |
|
Back to top |
|
 |
exerk |
Posted: Thu May 08, 2014 8:04 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
mqkrishna2010 wrote: |
...I have tried script also before posting this, but in scripting also we have to mention one alter statement for each and every queue.
This will take very large time. |
No you don't, that's what loops are for. _________________ 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 |
|
 |
Vitor |
Posted: Thu May 08, 2014 8:10 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqkrishna2010 wrote: |
I have tried script also before posting this, but in scripting also we have to mention one alter statement for each and every queue.
This will take very large time. |
If you mean "generating a script which has 150 ALTER statements in it" will take a long time, you're right and you're fairly stupid to do it that way. If you want to change them individually, why use script?
If you mean "generating a script which can locate all the XMITQs and produce ALTER statements for them" will take a long time, no it won't.
If you mean "running a script which will locate and alter all the XMITQs" will take a long time, run it over a weekend. And if it takes more than an hour or so to find & change 150 queues, you've coded it wrong. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Mr Butcher |
Posted: Mon May 12, 2014 4:57 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
|
Back to top |
|
 |
PaulClarke |
Posted: Mon May 12, 2014 6:37 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
Another possibility would be to use MQSCX. Then a task like this becomes truly trivial. MQSCX is like RUNMQSC but has the ability to process the responses directly so to do what you are asking would only require the command....
Code: |
* Simple script to create an ALTER QUEUE command for all xmit queues
foreach(DISPLAY QLOCAL(*) WHERE(USAGE EQ XMITQ))
@name = queue
print "Altering",@name
ALTER QLOCAL(<@name>) MAXMSGL(104857600)
endfor
|
It would almost as simple to write the ALTER QLOCAL commands to a file so you could pipe them through MQSCX/RUNMQSC at a later date.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
|