Thursday 18 December 2014

dmpmqcfg Save and Restore MQ queue manager objects

 Save Queue Manager configuration

 

dmpmqcfg(literally dump mq configurations), This is one of the powerfull and usefull command in the IBM MQ. Websphere MQ added this dmpmqcfg command along with others from v7.1 onwards for IBM i, windows, UNIX, & Linux platforms. This is actually a replacement of support pack MS03 popularly known as saveqmgr, which was in use for earlier versions.

This command is used to save the QM's configurations objects into different file formats and the output is used to create the duplicate and also to restore the existing. MQ objects are queue manager, such as queues, topics, channel  authentication records, and listeners.

If the environment is subjected for changes, It is used to save configurations periodically and create templates for duplicating. Please note that dmpmqcfg does not make backup of MQ Advanced Message Security policies and Subscriptions created by applications using the MQSUB MQI call of type MQSUBTYPE_API.    

dmpmqcfg is also used to dump the mq configurations of a remote queue manager without needed to run the dumpcfg command on the remote system. This is called queue mode.

  
The command dmpmqcfg takes the following options:

 -m   Queue manager name.
 -n   Object name or a generic object name.
 -t   Object type: all, authinfo, channel, clntconn, comminfo, listener, namelist, process, queue, qmgr, service, topic.
 -x   Export type: all, object, authrec, chlauth, sub.
 -o   Format: mqsc, 1line, setmqaut, grtmqmaut.
 -a   Dump all attributes.
 -z   Suppress warnings.
 -s   Reset channel message sequence number
 -q   Reply to queue name, default SYSTEM.DEFAULT.MODEL.QUEUE
 -r   Remote queue manager name (queued mode)
 -c   Client connection: default, DEFINE CHANNEL(chlname) CHLTYPE(CLNTCONN) ...


  • To save the MQ object configuration of queue manager QM.JOE.01 to qmgr_data.mqsc

   dmpmqcfg.exe -m QM.JOE.01 > qmgr_data.mqsc  


  • To save only the listeners data of QM.JOE.01 to qmgr_data_listener.out

   dmpmqcfg.exe -m QM.JOE.01 -t listener> qmgr_data_listener.out  


  • To save only the channel authentication records of QM.JOE.01 to qmgr_data_authrec.out

   dmpmqcfg.exe -m QM.JOE.01 -x authrec > qmgr_data_authrec.out  

  • To save the MQ configurations of a remote queue manager.

   dmpmqcfg -m MYQMGR -c "DEFINE CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(CLNTCONN) CONNAME('hostname(1414)')"  

Sample output will be looking like below:


 ******************************************************************************************
* Script generated on 2014-12-18   at 17.43.04
* Script generated by user 'xjjh1' on host 'NPENSOGFLT144'
* Queue manager name: QM.JOE.01
* Queue manager platform: Windows
* Queue manager command level: (710/711)
* Command issued: dmpmqcfg.exe -m QM.JOE.01
******************************************************************************************
ALTER QMGR +
*  ALTDATE(2014-12-02) +
*  ALTTIME(15.27.59) +
   CCSID(850) +
   CLWLUSEQ(LOCAL) +
*  CMDLEVEL(710) +
*  COMMANDQ(SYSTEM.ADMIN.COMMAND.QUEUE) +
*  CRDATE(2014-12-02) +
*  CRTIME(15.27.59) +
   DEADQ('SYSTEM.DEAD.LETTER.QUEUE') +
*  PLATFORM(WINDOWSNT) +
*  QMID(QM.JOE.01_2014-12-02_15.27.59) +
   SSLCRYP(' ') +
   SSLKEYR('C:\IBM_MQ\qmgrs\QM!JOE!01\ssl\key') +
   SUITEB(NONE) +
*  VERSION(07010003) +
*  XRCAP(YES) +
   FORCE



P.S: In the above sample the lines starting with asterisk('*') will be not be added when restoring the file. These lines are only used to study the configurations nothing else.

Restore Queue Manager configuration

-on progress to be written here-

3 comments:

  1. you are the best, was looking for these commands was getting errors but you made it so simplified to understand.
    please post good stuff on other topics also, Thank you a lot

    ReplyDelete
  2. Tinted steel oxide plates | Titanium Arts
    Tinted steel oxide plates. titanium apple watch Tinted steel oxide 출장안마 plates, price of titanium which are used by steel mills titanium bolts and mills to tungsten titanium produce high quality natural

    ReplyDelete