Ryan

使用saveqmgr导出WebSphere MQ队列定义
运维实施民航气象数据库两年多了,每次重装MQ都是先看看有没有前任写下的定义,没有就自己查看备机的队列属性手工写,效...
扫描右侧二维码阅读全文
10
2019/04

使用saveqmgr导出WebSphere MQ队列定义

运维实施民航气象数据库两年多了,每次重装MQ都是先看看有没有前任写下的定义,没有就自己查看备机的队列属性手工写,效率太低,偶然发现IBM官网提供一个专用的定义导出工具,太爽了。

本文适用于 WebSphere MQ 6.0和7.0,7.1中已经提供dumpmqcfg命令来导出定义

导出队列定义

下载ms03_unix.tar.Z,解压到/home/comm/export

$ cd /home/comm/export
$ ./saveqmgr.aix --localQMgr JBAA --outputFile jbaa.mqsc --saveSecurity jbaa.scrt

队列定义就会保存到jbaa.mqsc

报错处理

$ ./saveqmgr.aix --localQMgr JBAA --outputFile jbaa.mqsc --saveSecurity jbaa.scrt
exec(): 0509-036 Cannot load program ./saveqmgr.aix because of the following errors:
        0509-150   Dependent module /usr/lib/libmqm.a(libmqm.o) could not be loaded.
        0509-103   The module has an invalid magic number.

原因:saveqmgr.aix是使用64位库编译的,而装WebSphere MQ默认链接的是32位的库,所以调用失败,删除32位库的链接就好了

# cd /usr/mqm/bin
# dltmqlnk
deleteing /usr/lib/libimqb23ia_r.a
deleteing /usr/lib/libmqmcs.a
deleteing /usr/lib/libmqmzse.a
deleteing /usr/lib/libmqmcs_r.a
deleteing /usr/lib/libimqb23ia.a
deleteing /usr/lib/libmqjx_r.so
deleteing /usr/lib/libmqccics_r.a
deleteing /usr/lib/libmqiz_r.a
deleteing /usr/lib/libimqc23ia_r.a
deleteing /usr/lib/libmqiz.a
deleteing /usr/lib/libmqicb_r.a
deleteing /usr/lib/libmqic.a
deleteing /usr/lib/libimqc23ia.a
deleteing /usr/lib/libmqicb.a
deleteing /usr/lib/libmqic_r.a
deleteing /usr/lib/libmqmxa_r.a
deleteing /usr/lib/libmqmcb_r.a
deleteing /usr/lib/libimqs23ia_r.a
deleteing /usr/lib/libmqmcb.a
deleteing /usr/lib/libmqmzf_r.a
deleteing /usr/lib/libimqs23ia.a
deleteing /usr/lib/libmqmxa.a
deleteing /usr/lib/libmqmax.a
deleteing /usr/lib/libmqz_r.a
deleteing /usr/lib/libmqmax_r.a
deleteing /usr/lib/libmqm_r.a
deleteing /usr/lib/libmqmcics_r.a
deleteing /usr/lib/libmqmr.a
deleteing /usr/lib/libmqm.a
deleteing /usr/lib/libmqmzf.a
deleteing /usr/lib/libmqz.a
deleteing /usr/lib/libmqjxs_r.so
deleteing /usr/lib/libmqcxa_r.a
deleteing /usr/lib/libmqcxa.a

还原链接

# cd /usr/mqm/bin
# ./crtmqlnk
linking /usr/mqm/lib/libmqmzse.a
linking /usr/mqm/lib/libmqmcs_r.a
linking /usr/mqm/lib/libmqmcs.a
linking /usr/mqm/lib/libimqb23ia_r.a
linking /usr/mqm/lib/libimqb23ia.a
linking /usr/mqm/lib/libmqic.a
linking /usr/mqm/lib/libimqc23ia.a
linking /usr/mqm/lib/libmqicb_r.a
linking /usr/mqm/lib/libmqic_r.a
linking /usr/mqm/lib/libmqccics_r.a
linking /usr/mqm/lib/libimqc23ia_r.a
linking /usr/mqm/lib/libmqiz_r.a
linking /usr/mqm/lib/libmqiz.a
linking /usr/mqm/lib/libmqicb.a
linking /usr/mqm/lib/libmqml_r.a
linking /usr/mqm/lib/libmqmr.a
linking /usr/mqm/lib/libmqmr_r.a
linking /usr/mqm/lib/libmqmax_r.a
linking /usr/mqm/lib/libmqmcics_r.a
linking /usr/mqm/lib/libmqmcb.a
linking /usr/mqm/lib/libimqs23ia_r.a
linking /usr/mqm/lib/libmqmxa.a
linking /usr/mqm/lib/libmqmax.a
linking /usr/mqm/lib/libmqmxa_r.a
linking /usr/mqm/lib/libmqz_r.a
linking /usr/mqm/lib/libmqm.a
linking /usr/mqm/lib/libmqm_r.a
linking /usr/mqm/lib/libmqz.a
linking /usr/mqm/lib/libimqs23ia.a
linking /usr/mqm/lib/libmqmcb_r.a
linking /usr/mqm/lib/libmqmzf_r.a
linking /usr/mqm/lib/libmqmzf.a
linking /usr/mqm/lib/libmqcxa.a
linking /usr/mqm/lib/libmqcxa_r.a
搬瓦工年付$187机房套餐补货了,电信联通优化,512M内存/500G流量/1G带宽,建站稳定,优惠码:BWH1ZBPVK,【点击购买】!
搬瓦工年付$28CN2高速线路,512M内存/500G流量/1G带宽,电信联通优化,延迟低,速度快,建站稳定,优惠码同上,【点击购买】!
Last modification:May 2nd, 2019 at 01:03 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment