ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Copy Queue Def

Post new topic  Reply to topic
 Copy Queue Def « View previous topic :: View next topic » 
Author Message
MartyITT
PostPosted: Thu Jul 11, 2019 11:08 am    Post subject: Copy Queue Def Reply with quote

Newbie

Joined: 11 Jul 2019
Posts: 2

I am new to IBM MQ but I am slowly learning the in-and-outs. I especially like the command line utils. My primary job is as a .Net programmer but I have been asked to support MQ so I'll give it my best shot.
Recently, I have been asked to copy specific queues from our DEV environment to our TEST\QA environment under different QueueMGRS. DEV and TEST are on different servers. I would like to export the definition to a file then move the file and import it on to the other server into the other queue mgr. I have Googled the heck out of this and cannot find an answer. I found out how to copy messages from one queue to another. And, how to copy a full Queue Mgr into another Queue Mgr. But, I cannot find a way to copy just the queue definition. Is there a way to do this? I am looking for something like:
DEFINE QLOCAL (MYQASERVER.QMGR_AAA.QUEDEF) LIKE (MYDEVSERVER.BBB_QMGR.QUEDEF)
...or...
dmpmqmsg -m BBB_QMGR -i QUEDEF -f c:\myfile.txt
then move the file to the TEST\QA server then run
dmpmqmsg -m QMGR_AAA -o QUEDEF -f c:\myfile.txt
The later (above) will only move messages. I feel like I am close. How do I just move the queue definition?
Thanks --Marty
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jul 11, 2019 11:18 am    Post subject: Re: Copy Queue Def Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

MartyITT wrote:
I have Googled the heck out of this and cannot find an answer.


I asked Mr. Google "IBM MQ export queue definitions" and he told me this.

Obviously you don't want the optional part about moving the messages.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
MartyITT
PostPosted: Fri Jul 12, 2019 6:59 am    Post subject: Copy Queue Def Reply with quote

Newbie

Joined: 11 Jul 2019
Posts: 2

Ok. So just in case this might help someone else out here is what I did. I ran:
We are on ver 9.1 so I used:
dmpmqcfg -m QMgr -a > dmpmqcfg.out.all.mqsc
and sent all of the Q Manager definitions into that file. Next I opened the file with Notepad.
Inside of the file, I found all of the DEFINE QLOCAL statements (or QREMOTE) for the queues that I needed.
Next, I copied those DEFINE scripts into a separate textfile called QueScripts.txt on the new server.
Lastly, I ran:
runmqsc MYQA_MQMANAGER < QueScripts.txt
That script-block ran all of the commands that I need to add those queues.
Worked like charm. Thanks.
Back to top
View user's profile Send private message
St!n0
PostPosted: Tue Aug 13, 2019 1:18 am    Post subject: Reply with quote

Novice

Joined: 02 Jan 2019
Posts: 14

you can use the command that MartyITT provided and export ALL definitions and then manually go copy what you need.

Or you can alter the dmpmqcfg to return only what you need, for example, if you just need 1 queue or a few queues with similar naming:

Code:

dmpmqcfg -m Qmgr -x object -n QUEUE.1

use with wildcards is also possible:
dmpmqcfg -m Qmgr -x object -n QUEUE*



If you are migrating an object it is also recommended that you include all OAM, CHLAUTH, …. definitions to have correct authorisation on the other side as well. use the "-x all" property for this

Code:
dmpmqcfg -m Qmgr -x all -n QUEUE.1
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Copy Queue Def
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.