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 IndexGeneral IBM MQ SupportRemove boo-coo Authrecs at once.

Post new topicReply to topic
Remove boo-coo Authrecs at once. View previous topic :: View next topic
Author Message
belchman
PostPosted: Wed Jan 16, 2019 11:41 am Post subject: Remove boo-coo Authrecs at once. Reply with quote

Partisan

Joined: 31 Mar 2006
Posts: 347
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
View user's profile Send private message
hughson
PostPosted: Wed Jan 16, 2019 2:54 pm Post subject: Re: Remove boo-coo Authrecs at once. Reply with quote

Grand Master

Joined: 09 May 2013
Posts: 1141
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
View user's profile Send private message Visit poster's website
hughson
PostPosted: Thu Jan 17, 2019 1:11 am Post subject: Reply with quote

Grand Master

Joined: 09 May 2013
Posts: 1141
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
View user's profile Send private message Visit poster's website
belchman
PostPosted: Thu Jan 17, 2019 4:13 am Post subject: Reply with quote

Partisan

Joined: 31 Mar 2006
Posts: 347
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
View user's profile Send private message
fjb_saper
PostPosted: Thu Jan 17, 2019 2:36 pm Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20022
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
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexGeneral IBM MQ SupportRemove boo-coo Authrecs at once.
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.