資源描述:
《MQ命令基本操作---》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、一.MQ基本操作????MQ中有幾個(gè)很重要的組件:隊(duì)列管理器(QueueManager)、隊(duì)列(Queue)和通道(Channel)。其基本的操作方法如下:????創(chuàng)建隊(duì)列管理器??crtmqm?–q?QMgrName??-q是指創(chuàng)建缺省的隊(duì)列管理器????刪除隊(duì)列管理器??dltmqm?QmgrName????啟動(dòng)隊(duì)列管理器??strmqm?QmgrName??如果是啟動(dòng)默認(rèn)的隊(duì)列管理器,可以不帶其名字????停止隊(duì)列管理器??endmqm?QmgrName?受控停止????endmqm?–i?QmgrName?立即停止????endmqm?–p?
2、QmgrName?強(qiáng)制停止????顯示隊(duì)列管理器??dspmq?–m?QmgrName????運(yùn)行MQSeries命令??runmqsc?QmgrName??如果是默認(rèn)隊(duì)列管理器,可以不帶其名字??查看通道狀態(tài)dischl(通道名稱)??往隊(duì)列中放消息??amqsput?QName?QmgrName??如果隊(duì)列是默認(rèn)隊(duì)列管理器中的隊(duì)列,可以不帶其隊(duì)列管理器的名字????從隊(duì)列中取出消息??amqsget?QName?QmgrName??如果隊(duì)列是默認(rèn)隊(duì)列管理器中的隊(duì)列,可以不帶其隊(duì)列管理器的名字????啟動(dòng)通道?13511074027?runmqch
3、l?–c?ChlName?–m?QmgrName???停止通道stopchl(chlname)復(fù)位通道resetchl(chlname)?啟動(dòng)偵聽??runmqlsr?–t?TYPE?–p?PORT?–m?QMgrName????停止偵聽??endmqlsr?-m?QmgrName????MQSeries命令????定義死信隊(duì)列??DEFINE?QLOCAL(QNAME)?DEFPSIST(YES)?REPLACE????設(shè)定隊(duì)列管理器的死信隊(duì)列??ALTER?QMGR?DEADQ(QNAME)????定義本地隊(duì)列??DEFINE?QL(QNAME)
4、?REPLACE????定義別名隊(duì)列??DEFINE?QALIAS(QALIASNAME)?TARGQ(QNAME)????遠(yuǎn)程隊(duì)列定義??DEFINE?QREMOTE(QRNAME)?+??RNAME(AAA)?RQMNAME(QMGRNAME)?+??XMITQ(QTNAME)????定義模型隊(duì)列??DEFINE?QMODEL(QNAME)?DEFTYPE(TEMPDYN)????定義本地傳輸隊(duì)列??DEFINE?QLOCAL(QTNAME)?USAGE(XMITQ)?DEFPSIST(YES)?+??INITQ(SYSTEM.CHANNEL.I
5、NITQ)+??PROCESS(PROCESSNAME)?REPLACE????創(chuàng)建進(jìn)程定義??DEFINE?PROCESS(PRONAME)?+??DESCR(‘STRING’)+??APPLTYPE(WINDOWSNT)+??APPLICID(’?runmqchl?-c?SDR_TEST?-m?QM_?TEST’)??其中APPLTYPE的值可以是:CICS、UNIX、WINDOWS、WINDOWSNT等????創(chuàng)建發(fā)送方通道??DEFINE?CHANNEL(SDRNAME)?CHLTYPE(SDR)+??CONNAME(‘100.100.100
6、.215(1418)’)?XMITQ(QTNAME)?REPLACE??其中CHLTYPE可以是:SDR、SVR、RCVR、RQSTR、CLNTCONN、SVRCONN、CLUSSDR和CLUSRCVR。????創(chuàng)建接收方通道??DEFINE?CHANNEL(SDR_?TEST)?CHLTYPE(RCVR)?REPLACE????創(chuàng)建服務(wù)器連接通道??DEFINE?CHANNEL(SVRCONNNAME)?CHLTYPE(SVRCONN)?REPLACE????顯示隊(duì)列的所有屬性??DISPLAY?QUEUE(QNAME)?[ALL]????顯示隊(duì)列
7、的所選屬性??DISPLAY?QUEUE(QNAME)?DESCR?GET?PUT??DISPLAY?QUEUE(QNAME)MAXDEPTH?CURDEPTH????顯示隊(duì)列管理器的所有屬性??DISPLAY?QMGR?[ALL]????顯示進(jìn)程定義??DISPLAY?PROCESS(PRONAME)????更改屬性??ALTER?QMGR?DESCR(‘NEW?DESCRIPTION’)??ALTER?QLOCAL(QNAME)?PUT(DISABLED)??ALTER?QALIAS(QNAME)?TARGQ(TARGQNAME)????刪除隊(duì)列
8、??DELETE?QLOCAL(QNAME)??DELETE?QREMOTE(QRNAME)????清除隊(duì)列