Reset Queue Manager

Use the Reset Queue Manager (MQCMD_RESET_Q_MGR) command as part of your backup and recovery procedures. [V9.0.2 Mar 2017]The Archive option enables you to notify the queue manager that all log extents, up to the specified one, have been archived. If the log management type is not ArchivedLog the command fails. The ReduceLog option enables you to request that the queue manager reduces the number of log extents, provided they are no longer required.

You can use this command to request that the queue manager starts writing to a new log extent, making the previous log extent available for archiving.

Use the Reset Queue Manager (MQCMD_RESET_Q_MGR) command to forcibly remove a publish/subscribe hierarchical connection for which this queue manager is nominated as either the parent or the child in a hierarchical connection. Valid on all supported platforms.

[V9.0.2 Mar 2017]

Archive option

This option requires change authority on the queue manager object.

The command fails if the log extent is not recognized, or is being written.

If, for some reason, the programmatic way that your enterprise notifies your log extents are archived is not working, and the disk is filling up with log extents, your administrator can use this command.

You need to determine yourself, the name to pass in from your archiving process, as to what has already been archived.

[V9.0.2 Mar 2017]

ReduceLog option

This option requires change authority on the queue manager object.

You should not need this command in normal circumstances. In general, when using automatic management of log files, you should leave it up to the queue manager to reduce the number of log extents as necessary.

For circular logging, this can remove inactive secondary log extents. The increase in secondary log extents is usually noticed by an increase in disk usage, often due to some specific issue in the past.
Note: For circular logging the command might not be able reduce the log extents by the required number immediately. In that case, the command returns, and the reduction takes place asynchronously at some later point.

For linear logging this can remove log extents that are not required for recovery (and have been archived) as noticed by a high value for ReusableLogSize on the Inquire Queue Manager Status command.

You should run this command only after some specific event that has caused the number of log extents to be extraordinarily large.

The command blocks until the chosen number of extents have been deleted. Note that the command does not return the number of extents that have been removed, but a queue manager error log message is written, indicating what has taken place.

Required parameters

Action (MQCFIN)
Action (parameter identifier: MQIACF_ACTION).

Specifies the action to take place.

The value can be any of the following values, but you can specify one only:
MQACT_ADVANCE_LOG
Requests that the queue manager starts writing to a new log extent, making the previous log extent available for archiving. This command is accepted only if the queue manager is configured to use linear logging.
MQACT_COLLECT_STATISTICS
Requests that the queue manager ends the current statistics collection period, and writes the statistics collected.
MQACT_PUBSUB
Requests a publish/subscribe reset. This value requires that one of the optional parameters, ChildName or ParentName, is specified.

[V9.0.2 Mar 2017]MQACT_ARCHIVE_LOG (11)
[V9.0.2 Mar 2017]Requests that log extents are archived.

The command fails if the log extent is not recognized, or is the current log.

If, for some reason, the programmatic way that your enterprise notifies your log extents are archived is not working, and the disk is filling up with log extents, your administrator can use this command.

[V9.0.2 Mar 2017]MQACT_REDUCE_LOG (10)
[V9.0.2 Mar 2017]You should not need this command in normal circumstances. In general, when using automatic management of log files, you should leave it up to the queue manager to reduce the number of log extents as necessary.

For circular logging, you can use this option to remove inactive secondary log extents. A growth in secondary log extents is usually noticed by an increase in disk usage, often due to some specific issue in the past.

You should run this command only after some specific event that has caused the number of log extents to be extraordinarily large.

The command blocks until the chosen number of extents have been deleted. Note that the command does not return the number of extents that have been removed, but a queue manager error log message is written, indicating what has taken place.

Optional parameters

[V9.0.2 Mar 2017]ArchivedLog (MQCFST)
[V9.0.2 Mar 2017]Specifies the name of the log extent to be archived (parameter identifier: MQCACF_ARCHIVE_LOG_EXTENT_NAME).

The maximum length of the string is MQ_LOG_EXTENT_NAME_LENGTH.

ChildName (MQCFST)
The name of the child queue manager for which the hierarchical connection is to be forcibly canceled (parameter identifier: MQCA_CHILD).

This attribute is valid only when the Action parameter has the value MQACT_PUBSUB.

The maximum length of the string is MQ_Q_MGR_NAME_LENGTH.

ParentName (MQCFST)
The name of the parent queue manager for which the hierarchical connection is to be forcibly canceled (parameter identifier: MQCA_PARENT).

This attribute is valid only when the Action parameter has the value MQACT_PUBSUB.

The maximum length of the string is MQ_Q_MGR_NAME_LENGTH.

[V9.0.2 Mar 2017]LogReduction (MQCFIN)
[V9.0.2 Mar 2017]Specifies that the type of log reduction (parameter identifier: MQIACF_LOG_REDUCTION).
The value can be one of:
MQLR_AUTO
-1. The default value. Reduce the log extents by an amount chosen by the queue manager.
MQLR_ONE
1. Reduce the log extents by one extent, if possible.
MQLR_MAX
-2. Reduce the log extents by the maximum number possible.

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:
[V9.0.2 Mar 2017]MQRCCF_CURRENT_LOG_EXTENT
[V9.0.2 Mar 2017]The specified log extent is the current log extent, and cannot have been validly archived yet.
[V9.0.2 Mar 2017]MQRCCF_LOG_EXTENT_NOT_FOUND
[V9.0.2 Mar 2017]The specified log extent was not found or is not valid.
[V9.0.2 Mar 2017]MQRCCF_LOG_NOT_REDUCED
[V9.0.2 Mar 2017]No log events could be removed.
MQRC_RESOURCE_PROBLEM
Insufficient system resources available.