Author |
Message
|
prabhu1950 |
Posted: Wed Jun 09, 2004 3:38 pm Post subject: Connecting to DB2 database from a Message Flow - Urgent |
|
|
Novice
Joined: 27 May 2004 Posts: 10
|
Hi everybody,
I have a problem connecting to the database from a message flow. I am not familiar with WBI Message Broker 5.0. I am using DB2 as user database. My requirement is to pass a query to the database and to prepare an XML message from the results of this query. Can anybody guide me how to set up a database connection, Please?
Thanks in advance
Vinod |
|
Back to top |
|
 |
WBI_user |
Posted: Wed Jun 09, 2004 5:27 pm Post subject: |
|
|
Partisan
Joined: 07 Aug 2001 Posts: 386
|
Please specify where is your DB2 and what platform. If DB2 is in the same machine of the WBI MB, the message broker is already connected to DB2 because it has to use the borker DB. If you are using a different user ID to access the DB2 on the same machine, you can try to see if you can connect to it using DB2 command line or control center. If you can be more specific, we may be able to provide better suggestion. Please also specify what are the Ids used when the broker is created. |
|
Back to top |
|
 |
kirani |
Posted: Wed Jun 09, 2004 10:14 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
You need to do following,
1) Create an ODBC connection to your user DB.
2) In your compute node refernce to that ODBC connection name.
3) Write some ESQL code to retrieve data from the DB. For example,
Code: |
SET OutputRoot.XML.Data.Result[] = ( SELECT t.* from Database.MyTable as t where t.primary_key = something);
|
For more information you can refer to WBIMB online help or redbook. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
prabhu1950 |
Posted: Thu Jun 10, 2004 5:02 am Post subject: |
|
|
Novice
Joined: 27 May 2004 Posts: 10
|
Hi Kiran,
Thanks for your quick reply. Now I am pretty clear about the procedure to follow. But I am not sure how to establish an ODBC connection to my user DB. I know I am asking a very silly question. But I am not familiar with these things.
Here I am trying to access a remote database which resides on Windows 2000 server. Please reply
Thanks
Vinod |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jun 10, 2004 5:15 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
This is not really a WBIMB/WMQI question any more.
Consult with your system administration staff, or your helpdesk.
If you are your system administration staff or helpdesk, you should look in Control Panels->Administrative Tools->Data Sources(ODBC). _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|