setmqm

Set the associated installation of a queue manager.

Purpose

Use the setmqm command to set the associated IBM® WebSphere® MQ installation of a queue manager. The queue manager can then be administered using only the commands of the associated installation. For example, when a queue manager is started with strmqm, it must be the strmqm command of the installation that was specified by the setmqm command.

For more information about using this command, including information about when to use it, see Associating a queue manager with an installation.

This command is only applicable to UNIX, Linux® and Windows.

Usage notes

  • You must use the setmqm command from the installation you want to associate the queue manager with.
  • The installation name specified by the setmqm command must match the installation from which the setmqm command is issued.
  • You must stop the queue manager before executing the setmqm command. The command fails if the queue manager is still running.
  • Once you have set the associated installation of a queue manager using the setmqm command, migration of the queue manager's data occurs when you start the queue manager using the strmqm command.
  • Once you have started the queue manager on an installation, you cannot then use setmqm to set the associated installation to an earlier version of IBM WebSphere MQ, as it is not possible to migrate back to earlier versions of IBM WebSphere MQ.
  • You can find out which installation is associated with a queue manager by using the dspmq command. See dspmq for more information.

Syntax

Read syntax diagramSkip visual syntax diagramsetmqm-mQMgrName -nInstallationName

Required Parameters

-mQMgrName
The name of the queue manager to set the associated installation for.
-nInstallationName
The name of the installation that the queue manager is to be associated with. The installation name is not case-sensitive.

Return codes

Return code Description
0 Queue manager set to an installation without error
5 Queue manager running
36 Invalid arguments supplied
59 Invalid installation specified
60 Command not executed from the installation named by the -n parameter
61 Invalid installation name for this queue manager
69 Resource problem
71 Unexpected error
72 Queue manager name error
119 User not authorized

Examples

  1. This command associates a queue manager QMGR1, with an installation with the installation name of myInstallation.
    MQ_INSTALLATION_PATH/bin/setmqm -m QMGR1 -n myInstallation