[UNIX, Linux, Windows, IBM i]

dltmqm (delete queue manager)

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

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

Usage notes

[Windows]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.

Deleting a cluster queue manager does not remove it from the cluster. To check whether the queue manager you 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 you 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. You 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.

Syntax

Read syntax diagramSkip visual syntax diagram dltmqm  -z QMgrName

Required parameters

QMgrName
The name of the queue manager to delete.

Optional parameters

-z
Suppresses error messages.

Return codes

Table 1. Return code identifiers and descriptions
Return code Description
0 Queue manager deleted
3 Queue manager being created
5 Queue manager running
16 Queue manager does not exist
24 Process using the previous instance of the queue manager was not disconnected
25 Error 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 Deleted queue manager available in Active Directory
33 Error while deleting the queue manager directory structure
39 Invalid parameter specified
49 Queue manager stopping
58 Inconsistent use of installations detected
62 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 Invalid log location
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

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