Associating a queue manager with an installation

When creating a queue manager, it is automatically associated with the installation that issued the crtmqm command. On UNIX, Linux, and Windows, we can change the installation associated with a queue manager using the setmqm command.


The installation that a queue manager is associated with limits that queue manager so that it can be administered only by commands from that installation. There are three key exceptions:

  • setmqm changes the installation associated with the queue manager. This command must be issued from the installation that we want to associate with the queue manager, not the installation that the queue manager is currently associated with. The installation name specified by the setmqm command has to match the installation from which the command is issued.
  • strmqm usually has to be issued from the installation that is associated with the queue manager. However, when a Version 7.0.1 or earlier queue manager is started on a Version 7.1 or later installation for the first time, strmqm can be used. In this case, strmqm starts the queue manager and associates it with the installation from which the command is issued.
  • dspmq displays information about all queue managers on a system, not just those queue managers associated with the same installation as the dspmq command. The dspmq -o installation command displays information about which queue managers are associated with which installations.

For HA environments, the addmqinf command automatically associates the queue manager with the installation from which the addmqinf command is issued. As long as the strmqm command is then issued from the same installation as the addmqinf command, no further setup is required. To start the queue manager using a different installation, we must first change the associated installation using the setmqm command.

When we want to associate a queue manager with an installation, we can use the setmqm command in the following ways:

  • Moving individual queue managers between equivalent versions of IBM MQ . For example, moving a queue manager from a test to a production system.
  • Migrating individual queue managers from an older version of IBM MQ to a newer version of IBM MQ. Migrating queue managers between versions has various implications that we must be aware of. For more information about migrating, see Maintain and migrate.


Procedure

  1. Stop the queue manager using the endmqm command from the installation that is currently associated with the queue manager.
  2. Associate the queue manager with another installation using the setmqm command from that installation. For example, to set queue manager QMB to be associated with an installation with the name Installation2, enter the following command from Installation2:
     MQ_INSTALLATION_PATH/bin/setmqm -m QMB -n Installation2
    
    where MQ_INSTALLATION_PATH is the path where Installation2 is installed.
  3. Start the queue manager using the strmqm command from the installation that is now associated with the queue manager. This command performs any necessary queue manager migration and results in the queue manager being ready to use.


What to do next

If the installation that a queue manager is associated with has been deleted, or if the queue manager status information is unavailable, the setmqm command fails to associate the queue manager with another installation. In this situation, take the following actions:
  1. Use the dspmqinst command to see the other installations on the system.
  2. Manually modify the InstallationName field of the QueueManager stanza in mqs.ini to specify another installation.
  3. Use the dltmqm command from that installation to delete the queue manager.

Parent topic: Configure multiple installations


Related concepts


Related information