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:

  1. Type REGEDIT from the command prompt to start the Registry Editor.

  2. Select the HKEY_LOCAL_MACHINE window.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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

  9. If the value called Name within this key matches the name of the queue manager you are deleting, delete the DefaultQueueManager key.

  10. Navigate the tree to the following key:

    HKEY_LOCAL_MACHINE\SOFTWARE\IBM\MQSeries\CurrentVersion\ Configuration\Services

  11. Within this key, delete the key whose name matches the subdirectory name of the queue manager which you are deleting.

  12. Navigate the tree to the following key:

    HKEY_LOCAL_MACHINE\SOFTWARE\IBM\MQSeries\CurrentVersion\ Configuration\QueueManager

  13. 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

  1. Stop the WebSphere MQ Services snap-in either from the task bar icon or from the control panel.

  2. Type REGEDIT on the command line.

  3. Select the HKEY_LOCAL_MACHINE window.

  4. Navigate the tree structure to find the following key:

    LOCAL_MACHINE\Software\IBM\MQSeries\CurrentVersion\Configuration\ Services\<queue_manager>\QueueManager

  5. Change the startup value to zero. (1 means automatic and 0 means manual.)

  6. Close the Registry Editor.

  7. 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:

  1. Stop all queue managers running on the machine from which you need to remove the queue manager.

  2. 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>

  3. 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.

  4. Delete the queue manager directory, all subdirectories and files.

  5. Delete the queue manager log directory, all subdirectories and files.

  6. Remove the queue manager's QueueManager stanza from the /var/mqm/mqs.ini configuration file.

  7. If the queue manager being deleted is also the default queue manager, remove the DefaultQueueManager stanza from the /var/mqm/mqs.ini configuration file.

  8. 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.