Reset Queue Manager

Use the Reset Queue Manager (MQCMD_RESET_Q_MGR) command as part of our backup and recovery procedures. 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.

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


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.

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

This option is not valid on IBM i.


ReduceLog option

This option requires change authority on the queue manager object.

We should not need this command in normal circumstances. In general, when using automatic management of log files, we 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.

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

This option is not valid on IBM i.


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. Note: Not valid on HP Integrity NonStop Server, or z/OS .

      MQACT_COLLECT_STATISTICS
      Requests that the queue manager ends the current statistics collection period, and writes the statistics collected. Note: Not valid on HP Integrity NonStop Server, or z/OS.

      MQACT_PUBSUB
      Requests a publish/subscribe reset. This value requires that one of the optional parameters, ChildName or ParentName, is specified.

      MQACT_ARCHIVE_LOG (11)
      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.

      MQACT_REDUCE_LOG (10)
      We should not need this command in normal circumstances. In general, when using automatic management of log files, we should leave it up to the queue manager to reduce the number of log extents as necessary.

      For circular logging, we 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.

      We 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

    ArchivedLog (MQCFST)
    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.

    LogReduction (MQCFIN)
    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:

      MQRCCF_CURRENT_LOG_EXTENT
      The specified log extent is the current log extent, and cannot have been validly archived yet.

      MQRCCF_LOG_EXTENT_NOT_FOUND
      The specified log extent was not found or is not valid.

      MQRCCF_LOG_NOT_REDUCED
      No log events could be removed.

      MQRC_RESOURCE_PROBLEM
      Insufficient system resources available.

Parent topic: Definitions of the Programmable Command Formats