DX Application Performance Management

  • 1.  How to roll back the change to Websphere MQ

    Posted Oct 02, 2014 02:25 AM

    We are planning to do a POC on the MQ. And we need to run the following command during the configuration as the following. We would like to know the rollback command after finishing the POC. What is the command to run to return back to the stage before starting configuring it?

     

     

     

     

     

     

     

     

    DEFINE CHANNEL(WILY.SVRCONN) CHLTYPE(SVRCONN) TRPTYPE(TCP) MCAUSER('wily')
    DESCR('Server connection channel for wily')

    setmqaut -m <queue mgr name> -t qmgr -p wily +dsp +inq +connect
    setmqaut -m <queue mgr name> -t queue -p wily -n '**' +inq +dsp
    setmqaut -m <queue mgr name> -t chl -n '**' -p wily  +dsp
    setmqaut -m <queue mgr name> -t lstr -n '**' -p wily  +dsp
    setmqaut -m  <Queue_Manager> -t namelist -n    **    -p wily +dsp
    setmqaut -m <queue mgr name> -t queue -p wily -n SYSTEM.ADMIN.CHANNEL.EVENT
    +browse +get
    setmqaut -m <queue mgr name> -t queue -p wily -n SYSTEM.ADMIN.COMMAND.QUEUE
    +put
    setmqaut -m <queue mgr name> -t queue -p wily -n SYSTEM.ADMIN.PERFM.EVENT
    +browse +get
    setmqaut -m <queue mgr name> -t queue -p wily -n SYSTEM.ADMIN.QMGR.EVENT
    +browse +get
    setmqaut -m <queue mgr name> -t queue -p wily -n
    SYSTEM.ADMIN.STATISTICS.QUEUE +browse +get
    setmqaut -m <queue mgr name> -t queue -p wily -n SYSTEM.DEFAULT.MODEL.QUEUE
    +get

    #Queue Manager configuration:
    alter qmgr AUTHOREV(ENABLED) CHADEV(ENABLED) CHLEV(ENABLED) INHIBTEV(ENABLED)
    PERFMEV(ENABLED) LOCALEV(ENABLED) SSLEV(ENABLED) REMOTEEV(ENABLED)
    STRSTPEV(ENABLED)
    alter qmgr STATQ(ON)
    alter qmgr STATINT(1800)
    alter qmgr MONQ(MEDIUM)
    # Run the following using MQSC command
    #set the following system queue from no share to share
    alter ql(SYSTEM.ADMIN.PERFM.EVENT) share
    alter ql(SYSTEM.ADMIN.QMGR.EVENT) share
    alter ql(SYSTEM.ADMIN.CHANNEL.EVENT) share
    # To define DEAD.LETTER.QUEUE (if does not exist):
    Define QLOCAL(DEAD.LETTER.QUEUE) PUT(ENABLED) GET(ENABLED) DEFPSIST(NO) SHARE
    DEFSOPT (SHARED) MAXDEPTH (999999999)

    # To define SYSTEM.ADMIN.ACTIVITY.QUEUE and Handshake Queue, enter the
    command:
    define QLOCAL(SYSTEM.ADMIN.ACTIVITY.QUEUE) USAGE (normal) PUT (enabled) GET
    (enabled) DEFPSIST (no) SHARE DEFSOPT (SHARED) MAXDEPTH (999999999)
    define QLOCAL(CA_WILY_HANDSHAKE) USAGE(NORMAL) PUT(ENABLED) GET(ENABLED)
    DEFPSIST(NO) SHARE DEFSOPT (SHARED) MAXDEPTH (999999999)
    # To verify the SYSTEM.ADMIN.ACTIVITY.QUEUE, enter the command:
    display QLOCAL(SYSTEM.ADMIN.ACTIVITY.QUEUE)
    display QLOCAL(CA_WILY_HANDSHAKE)
    display QLOCAL(CA_WILY_HANDSHAKE)

    # To set the ACTIVREC property value to QUEUE
    alter QMGR ACTIVREC(QUEUE)

    # REFRESH SECURITY MQSC
    refresh security(*)



  • 2.  Re: How to roll back the change to Websphere MQ
    Best Answer

    Posted Oct 02, 2014 10:58 AM

    Use setmqaut with the -all switch to remove all permissions from the wily principal.  The rest of the stuff really doesn't need to be undone, in my opinion.  But if you really want to you'd just run the same alter qmgr command and replace DISABLED (assuming they weren't already enabled before the change).  Similarly you could UNSHARE the event queues with the alter ql commands.  The more important thing would be to "delete ql(CA_WILY_HANDSHAKE)" and remove the handshake queue if you're not going to use it.  Then refresh security again.



  • 3.  Re: How to roll back the change to Websphere MQ

    Posted Oct 02, 2014 12:10 PM

    Hi Chris,

     

    How about backing up the MQ before execute the command and restore it after the POC? What is the mq command to use for backing and restore?

     

    Thanks...



  • 4.  Re: How to roll back the change to Websphere MQ

    Posted Oct 02, 2014 01:36 PM

    Depends on whether you have persistent messages that are in the system, etc.  It's easy enough to backup the configuration.  In fact, I wrote scripts years ago that did just that at a previous employer.  But the permissions, queue definitions, and messages are all retained separately.  If it's just a test system for a POC, then don't worry about it. In production, the MQ admins will know the right commands.