Author |
Message
|
know_ashu |
Posted: Thu Sep 01, 2005 4:22 am Post subject: using multiple databases |
|
|
Novice
Joined: 25 Jun 2005 Posts: 22
|
Hi, I am using WMQI 2.1 with fix pack 06 at my local machine with windows XP. I have broker database (DB2 UDB 8.1) installed at my local machine.
My message flow requires connection to 2 databases (both DB2) residing on remote machines. I have done database catalog for both of those databases and can acess those thru my db2 command prompt.
How can i get connected to those databases from compute nodes in my message flow? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 01, 2005 4:26 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Did you create system level (or broker user level) ODBC data sources for these databases?
Then you merely need to configure the Compute/Database nodes to point at those data sources, and then make sure to use the Database.<table_name> form when using SELECT or etc. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
JT |
Posted: Thu Sep 01, 2005 5:52 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
You'll also want to ensure that the broker's service userid has the appropriate permissions to access the user databases. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 01, 2005 6:05 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Also remember that you can only use one database from within one node.
So, for example, if you need data from two databases (not tables, databases), then you need two nodes - compute or database or whatever. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
elvis_gn |
Posted: Thu Sep 01, 2005 8:35 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi jefflowrey,
As you said one node can only access one database. I have a doubt regarding the same.
I have never used the db perspective...I just create the ODBC,System DSN and do a mqsisetdbparms....
Suppose I have two compute nodes in a flow and both access different databases..how do i do mqsisetdbparms(which will only take a broker name)....can i do it twice for both the databases ???
When i do a mqsisetdbparms for a second database,does the first db parms get nullified ??? |
|
Back to top |
|
 |
kishoreraju |
Posted: Thu Sep 01, 2005 8:53 pm Post subject: |
|
|
Disciple
Joined: 30 Sep 2004 Posts: 156
|
|
Back to top |
|
 |
know_ashu |
Posted: Thu Sep 01, 2005 10:05 pm Post subject: |
|
|
Novice
Joined: 25 Jun 2005 Posts: 22
|
here there are few problems:
1. I do NOT have mqsisetdbparms command with this WMQI2.1 fixpack 06. If you suggest me to install any fixpack, kindly let me know from where to get it?
2. Those additional databases of interfacing application resides on customer machines in different geographical area. They give only system generated userids and passwords to us. We cannot ask them to give any particular userid that I am using for my broker. And both the user Ids given for those two databases are different. |
|
Back to top |
|
 |
EddieA |
Posted: Thu Sep 01, 2005 10:45 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
how do i do mqsisetdbparms(which will only take a broker name) |
Code: |
mqsisetdbparms brokername -n DataSourceName -u DataSourceUserId -p DataSourcePassword |
So, what's the DataSourceName parameter for then.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
EddieA |
Posted: Thu Sep 01, 2005 10:48 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
I do NOT have mqsisetdbparms command with this WMQI2 |
Unfortunately, this only came with V5.
Quote: |
And both the user Ids given for those two databases are different. |
This isn't possible with V2.1. The broker will always use Service ID to connect to the database.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
elvis_gn |
Posted: Fri Sep 02, 2005 12:02 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi EddieA,
What i meant was that i cannot specify for which compute/flow to use a dataSourseName(and I know i can set the datasource name in the compute node )....mqsisetdbparms is only broker specific....
So I guess I can have 'n' number of databases linked to a broker.... |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 02, 2005 3:58 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
EddieA wrote: |
This isn't possible with V2.1. The broker will always use Service ID to connect to the database. |
Actually, that's not quite true.
Particularly for SQLServer, you can override the user in the DSN. Also there are cases where broker will use the database user, if one is defined, instead of the service user - I think particularly when talking to DB2.
I'm a little fuzzy on the details, though. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
EddieA |
Posted: Fri Sep 02, 2005 6:16 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
Particularly for SQLServer, you can override the user in the DSN. Also there are cases where broker will use the database user, if one is defined, instead of the service user - I think particularly when talking to DB2. |
Don't know about SQLServer, as I've never used that.
But, you are right about the DB User. If one is given when creating the Broker, then that one is used instead of the Service ID. But it's still a single User/Pswd combo for all DBs.
It's been a long time since I've used V2.1 as well.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
|