
If you are not familiar with what IBM MQ (message queue) is, check out our Getting Started page. This assumes you have installed MQ server.
On Linux, the /etc/opt/mqm/mqinst.ini file contains information about each installation of MQ server. On Windows, the information is stored in the registry. Following is an example of what would be in the mqinst.ini file.
Installation:
Name=Installation1
Description=
Identifier=1
FilePath/opt/mqm
Primary:
Name=Installation1
Installation name
Once the installation name has been defined, it cannot be changed.
- The dspmqinst command can be used to display information about an installation. By default, the first installation will have a name of "Installation1".
- The crtmqinst command can be used to defined an installation name for for additional installations.
- The setmqinst command can be used to update the mqinst.ini file to set an installation as the primary installation.
- The dltmqinst command can be used to delete an installation from the mqinst.ini file.
Unset Primary Installation
The setmqinst command updates the mqinst.ini file. The -x option unsets an installation as the primary installation. You should always unset an installation before setting an installation as the primary installation. You would also need to use the -p option followed by the root directory of the primary installation or the -n option followed by the name of the installation, like this.
setmqinst -x -n Installation1
setmqinst -x -p /opt/mqm
Set Primary Installation
The -i option sets an installation as the primary installation. After unsettting an installation, you will need to provided the full path to the setmqinst command, or update the PATH variable to contain the full path to the setmqinst command. You would also need to use the -p option followed by the root directory of the primary installation or the -n option followed by the name of the installation, like this.
/opt/mqm/bin/setmqinst -i -n Installation2
/opt/mqm/bin/setmqinst -i -p /opt/mqm2
Description
Optionally, the -d option can be use to define "description" in the mqinst.ini file. You would also need to use the -p option followed by the root directory of the primary installation or the -n option followed by the name of the installation, like this.
setmqinst -d "Installation 2" -n Installation2
Did you find this article helpful?
If so, consider buying me a coffee over at