Reset Cluster
The Reset Cluster (MQCMD_RESET_CLUSTER) command forces a queue manager to leave a cluster.
Required parameters
- ClusterName (MQCFST)
- Cluster name (parameter identifier: MQCA_CLUSTER_NAME).
The name of the cluster to be reset.
The maximum length of the string is MQ_CLUSTER_NAME_LENGTH.
- QMgrIdentifier (MQCFST)
- Queue manager identifier (parameter identifier: MQCA_Q_MGR_IDENTIFIER).
This parameter is the unique identifier of the queue manager to be forcibly removed from the cluster. Only one of QMgrIdentifier and QMgrName can be specified. Use QMgrIdentifier in preference to QmgrName, because QmgrName might not be unique.
- QMgrName (MQCFST)
- Queue manager name (parameter identifier: MQCA_Q_MGR_NAME).
This parameter is the name of the queue manager to be forcibly removed from the cluster. Only one of QMgrIdentifier and QMgrName can be specified. Use QMgrIdentifier in preference to QmgrName, because QmgrName might not be unique.
- Action (MQCFIN)
- Action (parameter identifier: MQIACF_ACTION).
Specifies the action to take place. This parameter can be requested only by a repository queue manager.
The value can be any of the following values:- MQACT_FORCE_REMOVE
- Requests that a queue manager is forcibly removed from a cluster.
Optional parameters
- CommandScope (MQCFST)
- Command scope (parameter identifier: MQCACF_COMMAND_SCOPE). This parameter applies to z/OS only.
Specifies how the command is executed when the queue manager is a member of a queue sharing group. We can specify one of the following:
- blank (or omit the parameter altogether). The command is processed on the queue manager on which it was entered.
- a queue manager name. The command is processed on the queue manager you specify, providing it is active within the queue sharing group. If you specify a queue manager name other than the queue manager on which it was entered, we must be using a queue sharing group environment, and the command server must be enabled.
The maximum length is MQ_QSG_NAME_LENGTH.
- RemoveQueues (MQCFIN)
- Whether cluster queues are removed from the cluster (parameter identifier:
MQIACF_REMOVE_QUEUES).
This parameter indicates whether the cluster queues that belong to the queue manager being removed from the cluster are to be removed from the cluster. This parameter can be specified even if the queue manager identified by the QMgrName parameter is not currently in the cluster.
The value can be any of the following values:- MQCFO_REMOVE_QUEUES_YES
- Remove queues belonging to the queue manager being removed from the cluster.
- MQCFO_REMOVE_QUEUES_NO
- Do not remove queues belonging to the queue manager being removed. MQCFO_REMOVE_QUEUES_NO is the default.
Error codes
This command might return the following error code in the response format header, in addition to the values shown in Error codes applicable to all commands.
- Reason (MQLONG)
- The value can be any of the following values:
- MQRCCF_ACTION_VALUE_ERROR
- Value not valid.
Parent topic: Definitions of the Programmable Command Formats