dmpmqcfg (dump queue manager configuration)
Use the dmpmqcfg command to dump the configuration of an IBM® MQ queue manager.
Use the dmpmqcfg command to dump the configuration of IBM MQ queue managers. If any default object has been edited, the -a option must be used if the dumped configuration will be used to restore the configuration.
The dmpmqcfg utility dumps only subscriptions of type MQSUBTYPE_ADMIN, that is, only subscriptions that are created using the MQSC command DEFINE SUB or its PCF equivalent. The output from dmpmqcfg is a runmqsc command to enable the administration subscription to be re-created. Subscriptions that are created by applications using the MQSUB MQI call of type MQSUBTYPE_API are not part of the queue manager configuration, even if durable, and so are not dumped by dmpmqcfg. MQTT channels will only be returned for types -t all and -t mqttchl if the telemetry (MQXR) service is running. For instructions on how to start the telemetry service, see Administering MQ Telemetry.
From IBM MQ 8.0, the output of the dmpmqcfg is changed to ensure that password fields are commented out in the generated commands. This change brings the dmpmqcfg command in line with the DISPLAY commands, that show password fields as PASSWORD(********).
- Include only, objects defined with QSGDISP(QMGR) or QSGDISP(COPY).
- Include objects defined with QSGDISP(QMGR) and QSGDISP(COPY). If the queue manager is a member of a queue sharing group, QSGDISP(GROUP) and QSGDISP(SHARED) are also included.
- Include only, objects defined with QSGDISP(COPY)
- Include only, objects defined with QSGDISP(GROUP); the target queue manager must be a member of a queue sharing group.
- Include only, objects defined with QSGDISP(QMGR). This is the default behavior if you use this environment variable, to match the existing behavior of dmpmqcfg.
- Include only, objects defined with QSGDISP(QMGR) or QSGDISP(COPY).
- Include only, objects defined with QSGDISP(SHARED).
- Inquire the usage message for
- Force a client mode connection. If the -c parameter is qualified with the option default, the default client connection process is used. If -c is omitted, the default is to attempt to connect to the queue manager first by using server bindings and then if this fails by using client bindings.
If the option is qualified with an MQSC DEFINE CHANNEL CHLTYPE(CLNTCONN) string then this is parsed and if successful, used to create a temporary connection to the queue manager.
- -x [all|object|authrec|chlauth|sub|policy ]
- Filter the definition procedure to show object definitions, authority records, channel authentication records, durable subscriptions or policy. The default value all is that all types are returned.
Note that when you specify an export type of policy, the security policies for the queue manager are reported in the configuration information dumped.
- Return object definitions to show all attributes. The default is to return only attributes which differ from the defaults for the object type.
- -s SeqNumber
- Reset channel sequence number for sender, server and cluster sender channel types to the numeric value specified. The value SeqNumber must be in the range 1 - 999999999.
- Activate silent mode in which warnings, such as those which appear when inquiring attributes from a queue manager of a higher command level are suppressed.
- -n [*|ObjectName]
- Filter the definitions produced by object or profile name, the object/profile name can contain a single asterisk. The * option can be placed only at the end of the entered filter string.
- @class authority records are included in dmpmqcfg output regardless of the object or profile filter specified.
- Choose a single type of object to export. The following table shows the possible values:
Table 1. Possible values for -t parameter Value Description all All object types authinfo An authentication information object channel or chl A channel comminfo A communications information object lstr or listener A listener mqttchl An MQTT channel namelist or nl A namelist process or prcs A process queue or q A queue qmgr A queue manager srvc or service A service topic or top A topic
- -o [mqsc|1line|2line|setmqaut|grtmqmaut|setmqspl]
- The following table shows the possible values:
Table 2. Possible values for -o parameter options Value Description mqsc Multi-line MQSC that can be used as direct input to runmqsc 1line MQSC with all attributes on a single line for line diffing 2line MQSC with output on two lines. The first line is an MQSC command string and the second is a commented version with immutable values. setmqaut setmqaut statements for AIX®, Linux®, and Windows queue managers; valid only when
-x authrecis specified.
grtmqmaut Linux only; generates iSeries syntax for granting access to the objects. setmqspl The security policies for the queue manager are reported in the format of setmqspl command lines. This format can be used to generate scripts to restore policy configuration to a queue manager.
Note that the setmqspl command lines produced by this format includes parameters (-m) that specify the queue manager from which the definition was backed up. This implies that the definitions need to be replayed against the same queue manager.
If you need to back up policy definitions from one queue manager, and restore them to a different queue manager, consider using the default MQSC format where the queue manager name is not explicitly specified.
- The name of the reply-to queue used when getting configuration information.
- The name of the remote queue manager/transmit queue when using queued mode. If this parameter is omitted the configuration for the directly connected queue manager (specified with the -m parameter) is dumped.
- The name of the queue manager to connect to. If omitted the default queue manager name is used.
- -w WaitTime
- The time, in seconds, that dmpmqcfg waits for replies to its commands.
Any replies received after a timeout are discarded, but the MQSC commands still run.
The check for timeout is performed once for each command reply.
Specify a time in the range 1 through 999999; the default value is 60 seconds.Timed-out failure is indicated by:
- Nonzero return code to the calling shell or environment.
- Error message to
- -u UserId
- The ID of the user authorized to dump the configuration of queue managers.
AuthorizationsThe user must have MQZAO_OUTPUT (+put) authority to access the command input queue (SYSTEM.ADMIN.COMMAND.QUEUE) and MQZAO_DISPLAY (+dsp) authority to access the default model queue (SYSTEM.DEFAULT.MODEL.QUEUE), to be able to create a temporary dynamic queue if using the default reply queue.
The user must also have MQZAO_CONNECT (+connect) and MQZAO_INQUIRE (+inq) authority for the queue manager, and MQZAO_DISPLAY (+dsp) authority for every object that is requested.
******************************************************************************* * Script ended on 2016-01-05 at 05.10.09 * Number of Inquiry commands issued: 14 * Number of Inquiry commands completed: 14 * Number of Inquiry responses processed: 273 * QueueManager count: 1 * Queue count: 55 * NameList count: 3 * Process count: 1 * Channel count: 10 * AuthInfo count: 4 * Listener count: 1 * Service count: 1 * CommInfo count: 1 * Topic count: 5 * Subscription count: 1 * ChlAuthRec count: 3 * Policy count: 1 * AuthRec count: 186 * Number of objects/records: 273 *******************************************************************************
To make these examples work you need to ensure that your system is set up for remote MQSC operation. See Configuring queue managers for remote administration.
dumps all the configuration information from remote queue manager MYQMGR in MQSC format and creates an ad-hoc client connection to the queue manager using a client channel called SYSTEM.ADMIN.SVRCONN.
dmpmqcfg -m MYQMGR -c "DEFINE CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(CLNTCONN) CONNAME('myhost.mycorp.com(1414)')"
dumps all configuration information from remote queue manager MYQMGR, in MQSC format, connects initially to local queue manager LOCALQM, and sends inquiry messages through this local queue manager.
dmpmqcfg -m LOCALQM -r MYQMGR