Windows: Removing maintenance level server updates

How to remove updates and restore the previous maintenance level using the Windows installer

Before you begin

Important: This task describes how to remove maintenance level updates for an IBM® MQ server. For information about how to remove maintenance level updates for an IBM MQ client, see Reverting a client to an earlier maintenance level on Windows.
  1. If you are running on a server with multiple IBM MQ installations, you must identify the installation. Make sure that the commands you enter run against the correct installation; see setmqenv.
  2. If User Account Control (UAC) is enabled, the user who does the installation must have Administrative authority. You must elevate any command or command prompt by selecting Run as Administrator. If you do not, the error AMQ4353 is written in the installation log

About this task

If you applied maintenance to IBM MQ, you can restore IBM MQ to a previous level of maintenance.

Important: If you installed the server at a particular maintenance level, a Manufacturing Refresh, you cannot restore IBM MQ to an earlier maintenance level.

Procedure

  1. Log on as an Administrator.
  2. Stop all applications using the IBM MQ installation.

    If you use the 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 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 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 diagramendmqm -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 MQ libraries they have loaded. If they do not, you must find another way to force applications to release IBM 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 MQ. The application is not informed about queue managers in the current installation being shut down.
      • Any applications that continue to have IBM MQ shared libraries from the installation loaded prevent you applying IBM MQ maintenance. An application might disconnect from a queue manager, or be forcibly disconnected, but keep an IBM MQ shared library loaded.
      Note: The topic, Applying maintenance level updates to multi-instance queue managers, describes how to apply maintenance to a multi-instance queue manager. A multi-instance queue manager can continue to run on one server, while maintenance is applied to another server.
    4. Stop any listeners associated with the queue managers, using the command:
      
      endmqlsr -m QMgrName
      
  4. Stop the IBM MQ service for the installation.
    1. Right-click the WebSphere MQ icon in the taskbar > click Stop WebSphere MQ.
  5. Remove the maintenance interactively, or silently using a command.
    • Interactively:
      1. For each installation of IBM MQ that has had maintenance applied, you are presented with one of the following icons in the Windows start menu:
        1. Start > Programs > IBM WebSphere MQ > Remove Refresh Pack <V.R.M.L> (installation name)
        2. Start > Programs > IBM WebSphere MQ > Remove Fix Pack <V.R.M.L> (installation name)
          where
          • V is the version number
          • R is the release number
          • M is the modification number
          • L is the level of modification
      2. Select the installation you want to maintain and click Remove to start the process.
      This returns the installation to the state it was in before the maintenance package was applied.
    • Silently:
      1. Open an elevated command prompt and enter the following command:
        
        amqicsdn.exe MQPINSTALLATIONNAME= name MQPUNINST=1 MQPSILENT=1
        
        where name is the name of the installation that you want to remove maintenance from.
        You can add other properties to the command, as listed in Table 1.
        Table 1. Properties used to install or uninstall a maintenance update
        Property Value Description
        MQPLOG path\file_name Pass a valid path to specify the log to be used during installation/uninstallation, for example MQPLOG=C:\TEMP\UPDATEINSTALL.LOG

        If MQPLOG is not specified (which is the case if you start maintenance by clicking on the Apply fix pack n.n.n.n icon in the IBM WebSphere® MQ program group) the log name used by default will be amqicsdn.txt in your TEMP directory ( %TEMP% ).

        MQPINSTALLATIONNAME Installation name The name of the installation to maintain. If there is only 1 installation (of any level) on the machine, this argument can be safely omitted.

        If there is more than 1 installation on the machine, amqicsdn.exe checks the value of MQPINSTALLATIONNAME. If one is not supplied, or the one that is supplied is unsuitable, then a GUI selection box appears. This selection box provides a list of installations to which this fix pack is applicable. If none are applicable, then amqicsdn.exe issues error message AMQ4781 and ends.

        MQPBACKUPPATH path Specifies the directory to back up into during installation, for example MQPBACKUPPATH=C:\BACKUP

        The directory, and any intermediate directories, you specify must already exist. If any one of the directories does not already exist, the install fails.

        MQPREBOOT 0|1 Specifies what to do when a reboot is required, for example MQPREBOOT=1.
        • If no value is supplied, you are prompted for what to do next.
        • If MQPREBOOT is set to 0, a reboot is suppressed
        • If MQPREBOOT is set to 1, the reboots go ahead without prompting.
        MQPINUSEOK 0|1 Specifies whether to continue even if a file is found to be currently locked by another application. If you choose to continue even if a file is locked by another application, then you must reboot to complete fix pack installation.
        • If no value is supplied, or if MQPINUSEOK is set to 0, the installation fails if files are found to be in use by other applications.
        • If MQPINUSEOK is set to 1, the installation is deferred until you reboot.
  6. Optional: If you no longer need the maintenance files that were loaded onto the system before maintenance was applied, you can remove them using Add/Remove programs or Programs and Features from the Control Panel.
    If you want to remove a maintenance file silently, run the following command:
    
    <patch_install_files>\_WebSphere MQ (fix pack <V.R.M.L> files)_installation\Change WebSphere MQ
    (fix pack <V.R.M.L> files) Installation.exe" -i silent
    
    where <patch_install_files> is the installation directory where maintenance files are installed.

    By default, this directory is C:\Program Files (x86)\IBM\source\WebSphere MQ <V.R.M.L>

    Notes:
    1. Run the command from outside the directory, otherwise the directory is not removed.
    2. If you omit -i silent, the command initiates the Graphical User Interface installer.

What to do next

On a server installation, you must restart the IBM WebSphere MQ taskbar application manually after the maintenance application completes.

If the IBM WebSphere MQ service is manually stopped, it must be manually restarted on the server. If the IBM WebSphere MQ service is not manually stopped, it is restarted automatically on the server.

The taskbar application is not restarted for any logged in sessions. Start the taskbar application in one of three ways:
  1. Start the taskbar application manually from the start menu.
  2. Log off and log back on again.
  3. Run the command:
    
     MQ_INSTALLATION_PATH\bin64\amqmtbrn.exe -Startup