Linux: Restoring the previous maintenance level

How to remove updates and restore the previous maintenance level using RPM.

Before you begin

If you are running on a server with multiple IBM® WebSphere® MQ installations, that is, IBM WebSphere MQ Version 7.0.1, Fix Pack 6 (or later), you must identify the installation. Make sure that the commands you enter run against the correct installation; see setmqenv.

You can apply and remove maintenance from a IBM WebSphere MQ MQI client that is not installed on the same server as a queue manager. You do not have to stop any queue managers or logon as administrator. Because you do not have to stop any queue managers, do not do steps 1 to 3 in the following maintenance procedure.
Important: pax and rpmbuild are not supplied as part of the product. You must obtain these from your Linux distribution supplier.

About this task

When maintenance is applied, the original versions of replaced files are saved to allow the updates to be removed if necessary. To restore the previous maintenance level, run an Red Hat Package Manager, RPM, uninstall command for all the packages that were updated by the maintenance package as follows:

Procedure

  1. Log in as a user in group mqm.
  2. Stop all applications using the IBM WebSphere MQ installation.

    If you use the IBM WebSphere MQ Managed File Transfer (MFT) component, ensure that any MFT agents have finished all of the file transfers that they were engaged in. There should be no incomplete transfers associated with the agents, and their SYSTEM.FTE.STATE queues should contain no messages.

  3. End all the activity of queue managers associated with the IBM WebSphere MQ installation.
    1. Run the dspmq command to list the state of all the queue managers on the system.

      Run either of the following commands from the installation that you are updating:

      dspmq -o installation -o status
      dspmq -a

      dspmq -o installation -o status displays the installation name and status of queue managers associated with all installations of IBM WebSphere MQ.

      dspmq -a displays the status of active queue managers associated with the installation from which the command is run.

    2. Run the MQSC command, DISPLAY LSSTATUS(*) STATUS to list the status of listeners associated with a queue manager.
      echo "DISPLAY LSSTATUS(*) STATUS" | runmqsc QmgrName
    3. Run the endmqm command to stop each running queue manager associated with this installation.
      Read syntax diagramSkip visual syntax diagram endmqm -c-w-i-p QmgrName

      The endmqm command informs an application that the queue manager it is connected to is stopping; see Stopping a queue manager.

      • For the maintenance to proceed, applications must respond to an endmqm command by disconnecting from the queue manager and releasing any IBM WebSphere MQ libraries they have loaded. If they do not, you must find another way to force applications to release IBM WebSphere MQ resources, such as by stopping the applications.
      • You must also stop applications that are using the client libraries that are part of the installation. Client applications might be connected to a different queue manager, running a different installation of IBM WebSphere MQ. The application is not informed about queue managers in the current installation being shut down.
      • Any applications that continue to have IBM WebSphere MQ shared libraries from the installation loaded prevent you applying IBM WebSphere MQ maintenance. An application might disconnect from a queue manager, or be forcibly disconnected, but keep a IBM WebSphere MQ shared library loaded.
    4. Stop any listeners associated with the queue managers, using the command:
       endmqlsr -m QMgrName
  4. Log in as root, or switch to the superuser using the su command.
  5. Run the rpm command to find out which packages are installed on your server.

    Enter the following command:

     rpm -qa | grep MQSeries
    Using the example given in Linux: Applying maintenance level updates, returns:
      MQSeriesRuntime-7.R.0-0
      MQSeriesSDK-7.R.0-0
      MQSeriesServer-7.R.0-0
      MQSeriesRuntime-Uxxxx-7.R.0-1
      MQSeriesSDK-Uxxxx-7.R.0-1
      MQSeriesServer-Uxxxx-7.R.0-1
    
    where R is the number of the Release.
  6. Run the rpm command to remove all the updates applied at level 1.

    Enter the following commands:

    rpm -ev MQSeriesRuntime-Uxxxx-7.R.0-1 MQSeriesSDK-Uxxxx-7.R.0-1
      MQSeriesServer-Uxxxx-7.R.0-1
    where R is the number of the Release.
  7. Repeat step 5 to check that the ptf packages have been removed, leaving only the original install packages:
    
      MQSeriesRuntime-7.R.0-0
      MQSeriesSDK-7.R.0-0
      MQSeriesServer-7.R.0-0
    
    where R is the number of the Release.

What to do next

For further information on using RPM to install software packages, see your Linux documentation.