|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Remove boo-coo Authrecs at once. |
« View previous topic :: View next topic » |
Author |
Message
|
belchman |
Posted: Wed Jan 16, 2019 11:41 am Post subject: Remove boo-coo Authrecs at once. |
|
|
Partisan
Joined: 31 Mar 2006 Posts: 386 Location: Ohio, USA
|
On a queue manager, I have hundreds or thousands of these.
SET AUTHREC +
PROFILE('AMQ.5C08229A22B5C4E1') +
GROUP('mqm') +
OBJTYPE(QUEUE) +
AUTHADD(BROWSE,CHG,CLR,DLT,DSP,GET,INQ,PUT,PASSALL,PASSID,SET,SETALL,SETID)
It was a result of me making a makedef from a dmpmqcfg on a queue manager in which an app created thousands of PERMDYN queues. I deleted the queues but cannot delete the authrecs.
I have tried both
delete authrec PROFILE('AMQ.*') OBJTYPE(QUEUE) GROUP('mqm')
delete authrec PROFILE('AMQ.**') OBJTYPE(QUEUE) GROUP('mqm')
After execution, it says "AMQ8863: IBM MQ authority record deleted." but when I issue a dmpmqcfg again, they are still there.
Anyone have an idea how I can remove these authrecs without spending a week removing them one by one? _________________ Make three correct guesses consecutively and you will establish a reputation as an expert. ~ Laurence J. Peter |
|
Back to top |
|
 |
hughson |
Posted: Wed Jan 16, 2019 2:54 pm Post subject: Re: Remove boo-coo Authrecs at once. |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
belchman wrote: |
I have tried both
delete authrec PROFILE('AMQ.*') OBJTYPE(QUEUE) GROUP('mqm')
delete authrec PROFILE('AMQ.**') OBJTYPE(QUEUE) GROUP('mqm')
After execution, it says "AMQ8863: IBM MQ authority record deleted." but when I issue a dmpmqcfg again, they are still there. |
These commands are asking the command server to delete a profile called 'AMQ.*' and 'AMQ.**' respectively, not "all profiles beginning with AMQ". MQSC commands have no multiple DELETE capability.
belchman wrote: |
Anyone have an idea how I can remove these authrecs without spending a week removing them one by one? |
I would suggest a GUI tool where you can select all the ones you want and press the Delete button would be the fastest if you have a GUI MQ admin tool in house. Depends on your vendor of course.
Otherwise, find an editor with good macros, and search and replace SET with DELETE and remove the AUTHADD parameter on the end of each SET command, and run that script.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
hughson |
Posted: Thu Jan 17, 2019 1:11 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
<Vendor_Plug>
Further to my last answer, this is the sort of thing that an MQSCX script can handle for you very easily.
Here's a little example script:-
Code: |
=echo cmds(yes) resp(yes)
foreach (DISPLAY AUTHREC OBJTYPE(QUEUE) ALL)
@this_profile = PROFILE
@this_user = ENTITY
if (substr(@this_profile,1,4) = "AMQ.")
if (ENTTYPE = "GROUP")
DELETE AUTHREC PROFILE('<@this_profile>') OBJTYPE(QUEUE) GROUP('<@this_user>')
else
DELETE AUTHREC PROFILE('<@this_profile>') OBJTYPE(QUEUE) PRINCIPAL('<@this_user>')
endif
endif
endfor |
Want to know more about MQSCX, read MQSCX Webpage, including how to get a trial.
</Vendor_Plug>
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
belchman |
Posted: Thu Jan 17, 2019 4:13 am Post subject: |
|
|
Partisan
Joined: 31 Mar 2006 Posts: 386 Location: Ohio, USA
|
Thank you Morag. _________________ Make three correct guesses consecutively and you will establish a reputation as an expert. ~ Laurence J. Peter |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jan 17, 2019 2:36 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The other alternative is to dump the records in a setmqaut format, filter and add a +remove at the end of each line... then run the resulting file...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|