dltmqm (delete queue manager)

Delete a queue manager.


Purpose

Use the dltmqm command to delete a specified queue manager and all objects associated with it. Before we can delete a queue manager, we must end it using the endmqm command.

We must use the dltmqm command from the installation associated with the queue manager that we are working with. We can find out which installation a queue manager is associated with using the dspmq -o installation command.

On Windows, it is an error to delete a queue manager when queue manager files are open. If you get this error, close the files and reissue the command.


Syntax

dltmqm  -z QMgrName


Required parameters

    QMgrName
    The name of the queue manager to delete.


Optional parameters

    -z
    Suppresses error messages.


Return codes

Return code Description
0 Queue manager deleted
3 Queue manager being created
5 Queue manager running
16 Queue manager does not exist
24 A process that was using the previous instance of the queue manager has not yet disconnected.
25 An error occurred while creating or checking the directory structure for the queue manager.
26 Queue manager running as a standby instance.
27 Queue manager could not obtain data lock.
29 Queue manager deleted, however there was a problem removing it from Active Directory.
33 An error occurred while deleting the directory structure for the queue manager.
49 Queue manager stopping
58 Inconsistent use of installations detected
62 The queue manager is associated with a different installation
69 Storage not available
71 Unexpected error
72 Queue manager name error
74 The IBM MQ service is not started.
100 Log location invalid.
112 Queue manager deleted. However, there was a problem processing the default queue manager definition in the product configuration file. The default queue manager specification might be incorrect.
119 Permission denied ( Windows only).


Examples

  1. The following command deletes the queue manager saturn.queue.manager.
    dltmqm saturn.queue.manager
    
  2. The following command deletes the queue manager travel and also suppresses any messages caused by the command.
    dltmqm -z travel
    


Usage notes

On Windows, it is an error to delete a queue manager when queue manager files are open. If you get this error, close the files and reissue the command.

Delete a cluster queue manager does not remove it from the cluster. To check whether the queue manager we want to delete is part of a cluster, issue the command DIS CLUSQMGR(*). Then check whether this queue manager is listed in the output. If it is listed as a cluster queue manager we must remove the queue manager from the cluster before deleting it. See the related link for instructions.

If you do delete a cluster queue manager without first removing it from the cluster, the cluster continues to regard the deleted queue manager as a member of the cluster for at least 30 days. We can remove it from the cluster using the command RESET CLUSTER on a full repository queue manager. Re-creating a queue manager with an identical name and then trying to remove that queue manager from the cluster does not result in the cluster queue manager being removed from the cluster. This is because the newly created queue manager, although having the same name, does not have the same queue manager ID (QMID). Therefore it is treated as a different queue manager by the cluster.


Related reference