|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Remote DB2 connection |
« View previous topic :: View next topic » |
Author |
Message
|
MrSmith |
Posted: Tue Dec 21, 2010 9:18 am Post subject: Remote DB2 connection |
|
|
 Master
Joined: 20 Mar 2008 Posts: 215
|
Broker - AIX - server1 (Dev)
Broker - AIX - server2 (UAT)
Broker - AIX - server3 (PreProd)
DB2 server - AIX - serverDB2 (single server covering all enviros previous with databases DEV01, UAT01 and PPD01)
Problem - Wanting to use a single datasource name in all flows across all environments to save having to override in bar file but wanting to access different databases per environment on serverDB2.
Configuration -
flows datasource set to XXXXX01
cataloged node for remote db server as DV01NODE
cataloged database on server1 as alias XXXXX01 with database name DEV01 on node DV01NODE
cataloged database on server2 as alias XXXXX01 with database name UAT01 on node DV01NODE
cataloged database on server3 as alias XXXXX01 with database name PPD01 on node DV01NODE
mqsisetdbparms for all the above respectively
set stanzas in odbc64.ini files in respective enviros as
Code: |
# EP Envronment Generic ESB Datasource
[XXXXX01]
Driver=/opt/IBM/mqsi/6.1/lib/libdb2Wrapper64.so
Description=DB2DB DB2 ODBC Database
Database=XXXXX01
|
Example above is obviously for the dev enviro the database value being changed to UAT01 and PPD01 accordingly on each broker server.
The way understood it was the datasource had to have the same name as the database which it is as in XXXXX01, the cataloging made it that XXXXX01 alias was actually looking at database DEV01 whose connection details were defined by node DV01NODE.
The unfortunate result is that usertrace and debug give following which is self explanatory
Code: |
DatabaseException BIP2322E: Database error: SQL State ''08001''; Native Error Code '-1013'; Error Text ''[IBM][CLI Driver] SQL1013N The database alias name or database name "XXXXX01" could not be found. SQLSTATE=42705 ''.
The error has the following diagnostic information: SQL State ''08001'' SQL Native Error Code '-1013' SQL Error Text ''[IBM][CLI Driver] SQL1013N The database alias name or database name "XXXXX01" could not be found. SQLSTATE=42705 ''
This message may be accompanied by other messages describing the effect on the message broker itself. Use the reason identified in this message with the accompanying messages to determine the cause of the error.
|
Have looked on the forum and althought there are various exerts regarding DB connection none that fit this that i have found. Anyone disagree would be most grateful for the link. Have tried jigging the parameters around but maybe i am missing something or maybe it actually cant be done? |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Dec 21, 2010 9:48 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Yes, it's unfortunate that DB2 requires that the DB2 DSN name must match the DB2 database name.
Otherwise, of course, you could just create the same DSN on each environment.
But it is in your long term best interest to put in place a procedure that will build and apply bar overrides before deploying to production. See recent discussions on the notion of Build Engineer for example.
"to save having to apply bar overrides" is not a good reason to ignore good change control practices. |
|
Back to top |
|
 |
MrSmith |
Posted: Wed Dec 22, 2010 1:12 am Post subject: |
|
|
 Master
Joined: 20 Mar 2008 Posts: 215
|
mqjeff unfortunate is very true
there will be procedueres put in place to deploy such bar files and the connection to some source repository enviro as well but this is not in my remit or control and was trying to save the client additional hassle in what is already a young team.
the most annoying thing is that from a db2 command line you can access it by the alias no problem so is it a broker issue in that ideally it would create a connection based on the alias name (stanza'd as the Database) and not try to match the 2? (IBM broker dev team hint hint)
Thanks to all. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Dec 22, 2010 4:05 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I think it's a DataDirect limitation, but I'm not sure. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|