strmqm (start queue manager)

Start a queue manager or ready it for standby operation.

Purpose

Use the strmqm command to start a queue manager.

You must use the strmqm command from the installation that is 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.

If a queue manager has no associated installation and there is no installation of IBM® WebSphere® MQ 7.0.1 on the system, the strmqm command associates the queue manager with the installation that issued the strmqm command.

If the queue manager startup takes more than a few seconds IBM MQ shows intermittent messages detailing the startup progress.

Usage notes

From IBM MQ 9.1, IBM MQ supports the use of back-up queue managers. That is, a queue manager where log extents are asynchronously copied to a backup machine, and where replay of the log records is periodically driven by use of the command strmqm -r. When the backup queue manager needs to be activated, use the command strmqm -a and then start the queue manager normally.
Attention: You cannot use LogManagement=Automatic, along with a backup queue manager, as extents might be reused before they are backed up. Furthermore, if you run the command strmqm -r together with LogManagement=Automatic, the command fails.

[UNIX]From IBM MQ 9.1, the security of data path/log/qm on UNIX systems is changed from 2775 to 2770.

The strmqm command checks the syntax of the CHANNELS and SSL stanzas in the qm.ini file early on, before starting the queue manager fully. If the qm.ini file contains any errors, this check makes it much easier to see what is wrong, and correct it quickly. If an error is found, strmqm outputs an AMQ9224 error message, describing the full details of the position of the error in the qm.ini file. It also ends immediately without starting the queue manager.

[V9.2.0 Jul 2020][Linux]From IBM MQ 9.2.0, you can use the environment variable MQLICENSE to accept or view the license.

Syntax

Read syntax diagramSkip visual syntax diagram strmqm  -c -r-a -x-e CMDLEVEL=Level-f-si -ss -dInformation -z  -ns QMgrName

Optional parameters

-a
Activate the specified backup queue manager. The backup queue manager is not started.

When activated, a backup queue manager can be started by using the control command strmqm QMgrName. The requirement to activate a backup queue manager prevents accidental startup.

When activated, a backup queue manager can no longer be updated.

For more information about using backup queue managers, see Backing up and restoring IBM MQ queue manager data.

-c
Starts the queue manager, redefines the default and system objects, then stops the queue manager. Any existing system and default objects that belong to the queue manager are replaced if you specify this flag, and any non-default system object values are reset (for example, the value of MCAUSER is set to blank).

Use the crtmqm command to create the default and system objects for a queue manager.

Note: If you run strmqm -c on a queue manager that is being used as a Managed File Transfer coordination queue manager you must re-run the MQSC script that defines the coordination queue manager objects. This script is in a file called queue_manager_name.mqsc, which is in the Managed File Transfer configuration directory.
-d Information
Specifies whether information messages are displayed. Possible values for Information are as follows:
Value Description
all All information messages are displayed. This value is the default value.
minimal The minimal number of information messages are displayed.
none No information messages are displayed. This parameter is equivalent to -z.

The -z parameter takes precedence over this parameter.

-e CMDLEVEL = Level
Enables a command level for this queue manager, and then stops the queue manager.

The queue manager is now able to use all functions that are provided by the specified command level. You can start the queue manager only with an installation that supports the new command level.

This option is only valid if the current command level that is used by the queue manager is lower than the maximum command level supported by the installation. Specify a command level that is greater than the current command level of the queue manager and less than or equal to the maximum command level supported by the installation.

Use exactly the command level as a value for Level that is associated with the function you want to enable.

This flag cannot be specified with -a, -c, -r or -x.

-f
Use this option if you know that a queue manager is not starting because its data directories are missing or corrupted.

The strmqm -f qmname command attempts to re-create the queue manager data directory and reset file permissions. If it is successful, the queue manager starts, unless the queue manager configuration information is missing. If the queue manager fails to start because the configuration information is missing, re-create the configuration information, and restart the queue manager.

In releases of the product before IBM WebSphere MQ 7.0.1, strmqm, with no -f option, automatically repaired missing data directories and then tried to start. This behavior is changed.

From IBM WebSphere MQ 7.0.1 onwards, the default behavior of strmqm, with no -f option, is not to recover missing or corrupted data directories automatically, but to report an error, such as AMQ6235 or AMQ7001, and not start the queue manager.

You can think of the -f option as performing the recover actions that used to be performed automatically by strmqm.

The reason for the change to the behavior of strmqm is that with the support for networked file storage in IBM WebSphere MQ 7.0.1, the most likely cause of missing or corrupted queue manager data directories is a configuration error that can be rectified, rather than the data directories are corrupted or irretrievably unavailable.

You must not use strmqm -f to re-create the queue manager data directories if you can restore the directories by correcting the configuration.

Possible solutions to problems with strmqm are to make the networked file storage location accessible to the queue manager, or to ensure the gid and uid of the mqm group and user ID on the server hosting the queue manager match the gid and uid of the mqm group and user ID on the server that is hosting the queue manager data directory.

From IBM WebSphere MQ 7.0.1, if you are performing media recovery for a queue manager, then you must use the -f option to re-create the queue manager data directory.

-ns
Prevents any of the following processes from starting automatically when the queue manager starts:
  • The channel initiator
  • The command server
  • Listeners
  • Services
This parameter also runs the queue manager as if the CONNAUTH attribute is blank, regardless of its current value. Client applications cannot connect because there are no listeners. Authorization of applications and control commands will occur based on the local OS user under which you run them. If the queue manager had previously used LDAP users/groups for its authorization records, then:
  1. These records will be ignored while the queue manager is running in -ns mode.
  2. You should not make changes to authorization records or create new objects while in this mode, because the authorization records that are created or amended in this mode will then contain user names derived from the operating system, not the LDAP repository.
Administrative changes must be made by using runmqsc because the command server is not running.
To re-enable the normal authorization service processing, that is, return the effective CONNAUTH value to its normal setting, you must end and start the queue manager without the -ns parameter.
-r
Updates the backup queue manager. The backup queue manager is not started.

IBM MQ updates the objects of the backup queue manager by reading the queue manager log and replaying updates to the object files.

For more information about using backup queue managers, see Backing up and restoring IBM MQ queue manager data.
Note: The option is not available for Native HA queue managers.
[Windows]-si
Interactive (manual) queue manager startup type. This option is available on IBM MQ for Windows only.

The queue manager runs under the logged on (interactive) user. Queue managers that are configured with interactive startup end when the user who started them logs off.

If you set this parameter, it overrides any startup type set previously by the crtmqm command, the amqmdain command, or the IBM MQ Explorer.

If you do not specify a startup type of either -si or -ss, the queue manager startup type that is specified on the crtmqm command is used.

[Windows]-ss
Service (manual) queue manager startup type. This option is available on IBM MQ for Windows only.

The queue manager runs as a service. Queue managers that are configured with service startup continue to run even after the interactive user is logged off.

If you set this parameter, it overrides any startup type set previously by the crtmqm command, the amqmdain command, or the IBM MQ Explorer.

-x

Start an instance of a multi-instance queue manager on the local server, permitting it to be highly available. If an instance of the queue manager is not already running elsewhere, the queue manager starts and the instance becomes active. The active instance is ready to accept local and remote connections to the queue manager on the local server.

If a multi-instance queue manager instance is already active on a different server the new instance becomes a standby, permitting it to takeover from the active queue manager instance. While it is in standby, it cannot accept local or remote connections.

You must not start a second instance of a queue manager on the same server.

The default behavior, omitting the -x optional parameter, is to start the instance as a single instance queue manager, forbidding standby instances from being started.

-z
Suppresses error messages.

This flag is used within IBM MQ to suppress unwanted information messages. Because using this flag can result in loss of information, do not use it when you are entering commands on a command line.

This parameter takes precedence over the -d parameter.

QMgrName
The name of a local queue manager. If omitted, the default queue manager is used.

Return codes

Table 1. Return code identifiers and descriptions
Return code Description
0 Queue manager started.
1 The location chosen for the queue manager data directory is invalid
3 Queue manager being created.
5 Queue manager running.
16 Queue manager does not exist.
23 Log not available.
24 A process that was using the previous instance of the queue manager has not yet disconnected.
30 A standby instance of the queue manager started. The active instance is running elsewhere.
31 The queue manager already has an active instance. The queue manager permits standby instances.
39 Invalid parameter specified.
43 The queue manager already has an active instance. The queue manager does not permit standby instances.
47 The queue manager already has the maximum number of standby instances.
49 Queue manager stopping.
58 Inconsistent use of installations detected.
62 The 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.
91 The command level is outside the range of acceptable values.
92 The queue manager's command level is greater or equal to the specified value.
100 Log location invalid.
114 Invalid QM.INI file stanza.
119 User not authorized to start the queue manager.

Examples

The following command starts the queue manager account:

strmqm account