Author |
Message
|
smitapc |
Posted: Mon Jun 10, 2013 11:25 pm Post subject: How to configure 2 Resource Manager for single queue manager |
|
|
Newbie
Joined: 10 Jun 2013 Posts: 9
|
Hi,
I am using IBM websphere MQ V7 and DB2 version 10
I need to create 2 resource manager stanzas in a single qm.ini file where the database, switfile are same. But only the user names for the database access are different. Please anyone let me know is this possible
regards,
smita |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jun 11, 2013 3:30 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Have you considered simply trying it? |
|
Back to top |
|
 |
mvic |
Posted: Tue Jun 11, 2013 5:38 pm Post subject: Re: How to configure 2 Resource Manager for single queue man |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
Try it in a test environment, let us know. |
|
Back to top |
|
 |
smitapc |
Posted: Tue Jun 11, 2013 9:34 pm Post subject: |
|
|
Newbie
Joined: 10 Jun 2013 Posts: 9
|
Yes i tried this and seems to be not working as the application wont be knowing which resource manager it should update.
In this case could you please suggest any solutions possible? |
|
Back to top |
|
 |
mvic |
Posted: Wed Jun 12, 2013 1:46 pm Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
smitapc wrote: |
Yes i tried this and seems to be not working as the application wont be knowing which resource manager it should update.
In this case could you please suggest any solutions possible? |
Please give a lot more detail. Are there error messages, reason codes from API calls? |
|
Back to top |
|
 |
smitapc |
Posted: Thu Jun 13, 2013 1:11 am Post subject: |
|
|
Newbie
Joined: 10 Jun 2013 Posts: 9
|
The qm.ini will be as below:
ExitPath:
ExitsDefaultPath=/tmp/bin
ExitsDefaultPath64=/tmp/bin64
#* *#
#* *#
Log:
LogPrimaryFiles=16
LogSecondaryFiles=16
LogFilePages=65535
LogType=CIRCULAR
LogBufferPages=4096
LogPath=/var/mqm/log/TEST!MQM/
LogWriteIntegrity=TripleWrite
Service:
Name=AuthorizationService
EntryPoints=14
ServiceComponent:
Service=AuthorizationService
Name=MQSeries.UNIX.auth.service
Module=amqzfu
ComponentDataSize=0
Subpool:
ShortSubpoolName=TEST!F0000
TuningParameters:
DefaultQBufferSize=1048576
DefaultPQBufferSize=1048576
TCP:
KeepAlive=Yes
QueueManagerStartup:
Chinit=No
XAResourceManager:
Name=db4
SwitchFile=db2swit
XAOpenString=db4,abc,abc,toc=p,hold_cursor=t
ThreadOfControl=PROCESS
XAResourceManager:
Name=db4
SwitchFile=db2swit
XAOpenString=db4,xyz,xyz,toc=p,hold_cursor=t
ThreadOfControl=PROCESS
now after adding the second stanza for the "XAResourceManager", i am getting following error in MQM logs:
06/13/13 11:10:21 - Process(16908356.1) User(mqm) Program(amqzxma0)
Host(run) Installation(Installation1)
VRMF(7.5.0.0) QMgr(TEST.MQM)
AMQ7601: Duplicate XA resource manager is not valid.
EXPLANATION:
Line 47 of the configuration file /var/mqm/qmgrs/TEST!MQM/qm.ini
contained a duplicate XA resource manager 'clsdb4'. This is not valid for
attribute Name. Each XA resource manager must be given a unique name.
ACTION:
Check the contents of the file and retry the operation. |
|
Back to top |
|
 |
mvic |
Posted: Thu Jun 13, 2013 5:03 am Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
Do you want one XAResourceManager stanza, or more than one? If one, then delete the unwanted other one. If more than one, then they must have different names.
smitapc wrote: |
AMQ7601: Duplicate XA resource manager is not valid.
EXPLANATION:
Line 47 of the configuration file /var/mqm/qmgrs/TEST!MQM/qm.ini
contained a duplicate XA resource manager 'clsdb4'. This is not valid for
attribute Name. Each XA resource manager must be given a unique name.
ACTION:
Check the contents of the file and retry the operation. |
|
|
Back to top |
|
 |
smitapc |
Posted: Thu Jun 13, 2013 10:48 pm Post subject: |
|
|
Newbie
Joined: 10 Jun 2013 Posts: 9
|
Yes i need more than one XAResourceManager stanza so that some application will use one resource manager and the other application will use the other resource manager. But with this configuration(2 XAResourceManager stanza in qm.ini) I am not able to achieve this.
One more requirement here is that in each stanza of the XAResourceManager, the DB(instance) will be same but only the user and password will be different.
Can we acheive this? |
|
Back to top |
|
 |
mvic |
Posted: Fri Jun 14, 2013 1:11 am Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
smitapc wrote: |
Yes i need more than one XAResourceManager stanza so that some application will use one resource manager and the other application will use the other resource manager. But with this configuration(2 XAResourceManager stanza in qm.ini) I am not able to achieve this. |
Why not? When you correct the mistake that they both have the same name, does this move you forwards? |
|
Back to top |
|
 |
smitapc |
Posted: Fri Jun 14, 2013 1:27 am Post subject: |
|
|
Newbie
Joined: 10 Jun 2013 Posts: 9
|
If I have XAResourceManager as below:
XAResourceManager:
Name=db4
SwitchFile=db2swit
[color=red]XAOpenString=db4,abc,abc,toc=p,hold_cursor=t[/color]
ThreadOfControl=PROCESS
XAResourceManager:
Name=db4
SwitchFile=db2swit
[color=red]XAOpenString=db4,xyz,xyz,toc=p,hold_cursor=t [/color]
ThreadOfControl=PROCESS
As you can see the Name= has same value for both stanza. For this configuration, in the MQM log, I get error as duplicate.
For me, requirement is that let the Name= be same for both, but the user that logs into this instance should be different. |
|
Back to top |
|
 |
exerk |
Posted: Fri Jun 14, 2013 1:36 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
smitapc wrote: |
...For me, requirement is that let the Name= be same for both... |
Not going to happen, as you've found already, and the Info Centre (for v7.5 certainly) clearly describes how to do it. _________________ 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 |
|
 |
mvic |
Posted: Fri Jun 14, 2013 1:39 am Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
smitapc wrote: |
For me, requirement is that let the Name= be same for both, but the user that logs into this instance should be different. |
Why do you have the requirement that Name= is the same in both stanzas?
If you read the documentation and the error message, it is obvious that this is not a valid configuration. http://pic.dhe.ibm.com/infocenter/wmqv7/v7r5/topic/com.ibm.mq.doc/fa12660_.htm |
|
Back to top |
|
 |
smitapc |
Posted: Fri Jun 14, 2013 2:03 am Post subject: |
|
|
Newbie
Joined: 10 Jun 2013 Posts: 9
|
Ok... then the solution is that need to have another instance itself for the other resource manager stanza. Will try this and let you know if any issues..
Ok .. .thanks a lot for the suggestions and replies.. :) |
|
Back to top |
|
 |
mvic |
Posted: Fri Jun 14, 2013 2:14 am Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
smitapc wrote: |
Ok... then the solution is that need to have another instance itself for the other resource manager stanza. Will try this and let you know if any issues.. |
Another instance.. are you talking about using another database instance?
I think you might have misunderstood the meaning of the "Name=" line in the stanza.
I notice you have the same text as the database connection name, "db4", in the xa_open string, and in the "Name=" line.
The xa_open string is the place to declare what database to connect to, and the credentials to use. The "Name=" text is only used by the qmgr to describe the name of the stanza. It does not pass into the communications between the qmgr and the database.
Why not call one stanza "db4_stanza1" and the other "db4_stanza2". |
|
Back to top |
|
 |
smitapc |
Posted: Fri Jun 14, 2013 3:17 am Post subject: |
|
|
Newbie
Joined: 10 Jun 2013 Posts: 9
|
OKK.... In this case, queue manager starts properly and there are no isssues.
Now I will try to bring up the application with this MQ configuration and check.
BTW, do you have any idea how any application will come to know which resource manager to use at run time as both application(in my case) will use a single queue manager to post messages ? |
|
Back to top |
|
 |
|