Author |
Message
|
jsebastian |
Posted: Sun Dec 24, 2006 4:02 pm Post subject: Making existing QM as default |
|
|
Newbie
Joined: 25 Aug 2004 Posts: 7
|
I have created a new Queue Manager and I want to make it default QM.
I was looking for command to make it default.
Any help would be appreciated |
|
Back to top |
|
 |
jsebastian |
Posted: Sun Dec 24, 2006 4:12 pm Post subject: |
|
|
Newbie
Joined: 25 Aug 2004 Posts: 7
|
After more google, I found it on IBM Docs.
On Windows and WebSphere MQ for Linux (x86 platform) systems, you can make an existing queue manager the default queue manager as follows:
1. Open the WebSphere MQ Explorer.
2. Right-click IBM WebSphere MQ, then select Properties.... The Properties for WebSphere MQ panel is displayed.
3. Type the name of the default queue manager into the Default queue manager name field.
4. Click OK. |
|
Back to top |
|
 |
pathipati |
Posted: Sun Dec 24, 2006 7:33 pm Post subject: |
|
|
Master
Joined: 03 Mar 2006 Posts: 296
|
How to do this from command line? |
|
Back to top |
|
 |
jefflowrey |
Posted: Sun Dec 24, 2006 8:12 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
On Windows, you can probably use amqmdain.
On Unix platforms, I believe the "default" queue manager is the one that's mentioned in the mqs.ini file. You could use your favorite text file manipulation tool to edit that file, or the Perl modules may have some good stuff for you too. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
pathipati |
Posted: Sun Dec 24, 2006 8:43 pm Post subject: |
|
|
Master
Joined: 03 Mar 2006 Posts: 296
|
Hi jefflowrey,
what is the option that we should specify with amqmdain? |
|
Back to top |
|
 |
JosephGramig |
Posted: Mon Dec 25, 2006 9:46 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
|
Back to top |
|
 |
pathipati |
Posted: Mon Dec 25, 2006 11:02 am Post subject: |
|
|
Master
Joined: 03 Mar 2006 Posts: 296
|
I tried both "amqmdain qmgr alter QManagerName -i auto" and "amqmdain auto QManagerName" and the commands executed successfully. But these are different from setting default Queue Manager using MQ Explorer. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Dec 25, 2006 12:24 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Yes, I would expect that "auto" would control whether the queue manager started up "auto"matically. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
exerk |
Posted: Wed Dec 27, 2006 1:16 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
chiru wrote: |
I tried both "amqmdain qmgr alter QManagerName -i auto" and "amqmdain auto QManagerName" and the commands executed successfully. But these are different from setting default Queue Manager using MQ Explorer. |
MQ Explorer effectively runs the amqmdain command in the background. Try it on another machine, checking the Registry entries before and after and you'll see there's no difference in what is done 'behind the scenes'. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
jsware |
Posted: Wed Dec 27, 2006 3:42 am Post subject: |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
exerk wrote: |
MQ Explorer effectively runs the amqmdain command in the background. Try it on another machine, checking the Registry entries before and after and you'll see there's no difference in what is done 'behind the scenes'. |
I'm not convinced that amqmdain can be used to change which queue manager is the default. As far as I can tell this can only be changed using IBM MQ commands when a queue manager is created with the -q option:
IBM System Admin Manual wrote: |
The DefaultQueueManager attribute is automatically updated if you create a new default queue manager. If you inadvertently create a new default queue manager and then want to revert to the original, alter the DefaultQueueManager attribute manually. |
If there was some kind of "setdftqm" command then the system admin guide would tell you to use that to change the default qmgr. _________________ Regards
John
The pain of low quaility far outlasts the joy of low price. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Dec 27, 2006 3:45 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
scottj2512 wrote: |
I'm not convinced that amqmdain can be used to change which queue manager is the default. |
I am.
And the documenation link that JosephGramig posted backs me up, too. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Dec 27, 2006 3:54 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
scottj2512 wrote: |
If there was some kind of "setdftqm" command then the system admin guide would tell you to use that to change the default qmgr. |
The System Admin Guide (the online version of which JosephGramig has linked to) has the amqmdain command in Chapter 17.
It also tries to be platform agnostic, hence "change the DefaultQueueManager attribute manually". On Windows "manually" means this command, on Unix it means the mqs.ini stanza _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
exerk |
Posted: Wed Dec 27, 2006 5:05 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
jefflowrey wrote: |
scottj2512 wrote: |
I'm not convinced that amqmdain can be used to change which queue manager is the default. |
I am.
And the documenation link that JosephGramig posted backs me up, too. |
I've tried this, just as an experiment you understand, and achieved the following result:
Invalid stanza 'DefaultQueueManager'
Tdocumentation does not include the stanza in the list for configuration.
Quote: |
If you are specifying queue manager configuration information, the valid values for stanza are:
XAResourceManager\name
ApiExitLocal\name
CHANNELS
ExitPath
Log
QueueManagerStartup
TCP
LU62
SPX
NetBios
Connection
QMErrorLog
If you are modifying WebSphere MQ configuration information, the valid values for stanza are:
ApiExitCommon\name
ApiExitTemplate\name
ACPI
AllQueueManagers
CHANNELS
DefaultQueueManager
LogDefaults |
The implication is (my understanding anyway) that the default qmgr can't be initially SET using amqmdain but can be modified thereafter.
Hmmm... _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Dec 27, 2006 5:14 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
exerk wrote: |
The implication is (my understanding anyway) that the default qmgr can't be initially SET using amqmdain but can be modified thereafter. |
I'd have gone with that. If you create a new queue manager and set it to be the default it will override the previous default (if any). So the logical way to set a new queue manager to be the default is the crtmqm command. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jsware |
Posted: Wed Dec 27, 2006 5:37 am Post subject: |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
jefflowrey wrote: |
I am.
And the documenation link that JosephGramig posted backs me up, too. |
Indeed, the command:
Code: |
amqmdain reg * -c add -s DefaultQueueManager -v Name=P21916T |
did make my qmgr P21916T the default. I stand corrected - lesson learnt: RTFM (all the way to the end of the section)
PS. The "Name=P21916T" attribute has to be "Name" as I found that "name=P21916T" did not work  _________________ Regards
John
The pain of low quaility far outlasts the joy of low price. |
|
Back to top |
|
 |
|