RESET QMGR

Use the MQSC command RESET QMGR as part of your backup and recovery procedures.

Using MQSC commands

For information on how you use MQSC commands, see Performing local administration tasks using MQSC commands.

You can issue this command from sources 2CR. For an explanation of the source symbols, see Using commands on z/OS®.

[V9.0.2 Mar 2017][UNIX, Linux, Windows, IBM i]Use the TYPE(ARCHLOG) option to notify the queue manager that all log extents, up to the specified one, have been archived. If the log management type is not ARCHIVE, the command fails. Use the TYPE(REDUCELOG) option to request that the queue manager reduces the number of log extents, provided they are no longer required.

Synonym: None

RESET QMGR

Read syntax diagramSkip visual syntax diagram RESET QMGR TYPE (ADVANCELOG)1(STATISTICS)1(PUBSUB)CHILD(child-name)PARENT(parent-name)(ARCHLOG)ARCHIVED( name?)2(REDUCELOG)REDUCE(AUTOONEMAX)2 CMDSCOPE(' ')3CMDSCOPE(qmgr-name)3CMDSCOPE(*)3
Notes:
  • 1 Not valid on z/OS.
  • 2 Not valid on IBM® i or z/OS.
  • 3 Valid only on z/OS when the queue manager is a member of a queue sharing group

Usage notes for RESET QMGR

  • 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 backup. See Updating a backup queue manager. Alternatively, you can use this command to request that the queue manager ends the current statistics collection period and writes the collected statistics. You can also use this command to forcibly remove a publish/subscribe hierarchical connection for which this queue manager is nominated as either the parent or the child in the hierarchical connection.
  • The queue manager might refuse a request to advance the recovery log, if advancing the recovery log would cause the queue manager to become short of space in the active log.
  • You are unlikely to use RESET QMGR TYPE(PUBSUB) other than in exceptional circumstances. Typically the child queue manager uses ALTER QMGR PARENT(' ') to remove the hierarchical connection.
  • When you need to disconnect from a child or parent queue manager with which the queue manager has become unable to communicate, you must issue the RESET QMGR TYPE (PUBSUB) command from a queue manager. When using this command, the remote queue manager is not informed of the canceled connection. It might, therefore, be necessary to issue the ALTER QMGR PARENT(' ') command at the remote queue manager. If the child queue manager is not manually disconnected, it is forcibly disconnected and the parent status is set to REFUSED.
  • If you are resetting the parent relationship, issue the ALTER QMGR PARENT(' ') command, otherwise the queue manager attempts to re-establish the connection when the publish/subscribe capability of the queue manager is later enabled.
  • Successful completion of the RESET QMGR TYPE(PUBSUB) command does not mean that the action completed. To check for true completion, see the RESET QMGR TYPE(PUBSUB) step in Checking that async commands for distributed networks have finished.
  • [V9.0.2 Mar 2017]You must specify one only of ADVANCELOG, STATISTICS, PUBSUB, ARCHLOG or REDUCELOG.
[V9.0.2 Mar 2017][UNIX, Linux, Windows, IBM i]

Usage notes for TYPE(ARCHLOG)

This option requires change authority on the queue manager object.

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.

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][UNIX, Linux, Windows, IBM i]

Usage notes for TYPE(REDUCELOG)

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, 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.
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 if you are using archive log management) as noticed by a high value for REUSESZ on the DISPLAY QMSTATUS 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.

Parameter descriptions for RESET QMGR

TYPE
ADVANCELOG
Requests that the queue manager starts writing to a new log extent, making the previous log extent available for backup. See Updating a backup queue manager. This command is accepted only if the queue manager is configured to use linear logging.

[V9.0.2 Mar 2017][UNIX, Linux, Windows, IBM i]ARCHLOG
[V9.0.2 Mar 2017][UNIX, Linux, Windows, IBM i]
ARCHIVED ( name )
Notifies the queue manager that this extent, and all logically earlier ones, have been archived.
The extent name is, for example, S0000001.LOG or AMQA000001 on IBM i.

PUBSUB
Requests that the queue manager cancels the indicated publish/subscribe hierarchical connection. This value requires that one of the CHILD or PARENT attributes is specified:
CHILD
The name of the child queue manager for which the hierarchical connection is to be forcibly canceled. This attribute is used only with TYPE(PUBSUB). It cannot be used together with PARENT.
PARENT
The name of a parent queue manager for which the hierarchical connection is to be forcibly canceled. This attribute is used only with TYPE(PUBSUB). It cannot be used together with CHILD.

[V9.0.2 Mar 2017][UNIX, Linux, Windows, IBM i]REDUCELOG
[V9.0.2 Mar 2017][UNIX, Linux, Windows, IBM i]
REDUCE
Requests the queue manager to reduce the number of inactive or superfluous log extents and the way in which the log extents are reduced.
The value can be one of the following:
AUTO
Reduce the log extents by an amount chosen by the queue manager.
ONE
Reduce the log extents by one extent, if possible.
MAX
Reduce the log extents by the maximum number possible.

STATISTICS
Requests that the queue manager ends the current statistics collection period and writes the collected statistics.

[z/OS]CMDSCOPE
This parameter applies to z/OS only and specifies how the command runs when the queue manager is a member of a queue sharing group.
CMDSCOPE must be blank, or the local queue manager, if QSGDISP is set to GROUP.
' '
The command runs on the queue manager on which it was entered. This value is the default value.
qmgr-name
The command runs on the queue manager you specify, providing the queue manager is active within the queue sharing group.

You can specify a queue manager name other than the queue manager on which it was entered, only if you are using a shared queue environment and if the command server is enabled.

*
The command runs on the local queue manager and is also passed to every active queue manager in the queue sharing group. The effect of setting this value is the same as entering the command on every queue manager in the queue sharing group.