Removing queue managers manually
If you want to delete the queue manager after stopping it manually, use the dltmqm command. If, for some reason, this command fails to delete the queue manager, use the manual processes described here.
Removing queue managers in WebSphere MQ for Windows
If you encounter problems with the dltmqm command in WebSphere MQ for Windows, use the following procedure to delete a queue manager:
- Type REGEDIT from the command prompt to start the Registry Editor.
- Select the HKEY_LOCAL_MACHINE window.
- Navigate the tree structure in the left-hand pane of the Registry Editor to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\IBM\MQSeries\CurrentVersion
Make a note of the values within this key called WorkPath and LogPath. Within each of the directories named by these values, you are going to delete a subdirectory containing the data for the queue manager that you are trying to delete. You now need to find out the name of the subdirectory which corresponds to your queue manager.
- Navigate the tree structure to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\IBM\MQSeries\CurrentVersion\ Configuration\QueueManager
Within this key there is a key for each of the queue managers on this computer containing the configuration information for the queue manager. The name of this queue manager key is the name of the subdirectory in which the queue manager's data is stored in the file system. By default, this name is the same as the queue manager name, but the name might be a transformation of the queue manager name.
- Examine the keys within the current key. Look for the key that contains a value called Name. Name contains the name of the queue manager you are trying to delete. Make a note of the name of the key containing the name of the queue manager you are trying to delete. This is the subdirectory name.
- Locate the queue manager data directory. The name of this directory is the WorkPath followed by the subdirectory name. Delete this directory, and all subdirectories and files.
- Locate the queue manager's log directory. The name of this directory is the LogPath followed by the subdirectory name. Delete this directory, and all subdirectories and files.
- Remove the registry entries that refer to the deleted queue manager. First, navigate the tree structure in the Registry Editor to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\IBM\MQSeries\CurrentVersion\ Configuration\DefaultQueueManager
- If the value called Name within this key matches the name of the queue manager you are deleting, delete the DefaultQueueManager key.
- Navigate the tree to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\IBM\MQSeries\CurrentVersion\ Configuration\Services
- Within this key, delete the key whose name matches the subdirectory name of the queue manager which you are deleting.
- Navigate the tree to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\IBM\MQSeries\CurrentVersion\ Configuration\QueueManager
- Within this key, delete the key whose name matches the subdirectory name of the queue manager which you are deleting.
Removing queue managers from the automatic startup list
- Stop the WebSphere MQ Services snap-in either from the task bar icon or from the control panel.
- Type REGEDIT on the command line.
- Select the HKEY_LOCAL_MACHINE window.
- Navigate the tree structure to find the following key:
LOCAL_MACHINE\Software\IBM\MQSeries\CurrentVersion\Configuration\ Services\<queue_manager>\QueueManager
- Change the startup value to zero. (1 means automatic and 0 means manual.)
- Close the Registry Editor.
- Run amqdain regsec.
Removing queue managers in WebSphere MQ for UNIX systems
The manual removal of a queue manager is potentially very disruptive, particularly if multiple queue managers are being used on a single system. This is because, to completely remove a queue manager, delete files, shared memory, and semaphores. As it is impossible to identify which shared memory and semaphores belong to a particular queue manager, it is necessary to stop all running queue managers.
To delete a queue manager manually, use the following procedure:
- Stop all queue managers running on the machine from which you need to remove the queue manager.
- Locate the queue manager directory from the configuration file /var/mqm/mqs.ini. To do this, look for the QueueManager stanza naming the queue manager to be deleted.
Its Prefix and Directory attributes identify the queue manager directory. For a Prefix attribute of <Prefix> and a Directory attribute of <Directory>, the full path to the queue manager directory is: <Prefix>/qmgrs/<Directory>
- Locate the queue manager log directory from the qm.ini configuration file in the queue manager directory. The LogPath attribute of the Log stanza identifies this directory.
- Delete the queue manager directory, all subdirectories and files.
- Delete the queue manager log directory, all subdirectories and files.
- Remove the queue manager's QueueManager stanza from the /var/mqm/mqs.ini configuration file.
- If the queue manager being deleted is also the default queue manager, remove the DefaultQueueManager stanza from the /var/mqm/mqs.ini configuration file.
- Remove all shared memory and semaphores owned by the mqm user ID and mqm group, or use the amqiclen command and pipe in the mqs.ini file, or restart the machine. Shared resources can be identified using the ipcs command, and can be removed with the ipcrm command.
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.