In the words of Dr Cathy Ryan, "If you don't write it down, it never happened".
The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.
My blog is PERSONAL, and is a repository of the stuff that I learn, play with, enjoy and want to share.
If you follow one of my tips, your mileage MAY well vary - Here be dragons :-)
Wednesday, 11 February 2015
IBM Integration Bus - Integration with DB2
On my current project, we have a requirement for flows executing inside IBM Integration Bus, on an Integration Node ( fka a Broker ), to access a DB2 database.
The integration is actually via the Open Database Connectivity (ODBC) API/interface, which has been around since early versions of Windows ( I think I first used ODBC with MS Windows for Workgroups 3.1.1 and Windows 95, in order to connect to the IBM iSeries database ).
This requires some consideration, as the ODBC capability for DB2 is provided by the DB2 Client. Therefore, we have installed the DB2 Client onto the AIX LPARs hosting IIB, via the following response file: -
In order for this to work, it was necessary to catalogue the DB2 server ( db2 catalog tcpip node .... ) and the database ( db2 catalog database ... ) on the DB2 client, as db2user1.
The ODBC.INI file, used by IIB, references the alias name from the catalog, to which the IIB flow connects, essentially making the connection via the DB2 client, to the remote database.
We then tried to add a second catalog entry, for a different user ID, to a different database e.g. database foobar accessed by user db2user2.
So we had a single set of DB2 client binaries, but we had two DB2 users ( instances ), each with its own remote database aliased via the catalog.
This didn't work too well, we found that IIB, via ODBC, would try/fail to connect to the second database using the first set of credentials.
Long story short, we ended up with a different solution; a single DB2 user/instance on the IIB, with both databases in its catalogue, BUT with IIB sending different credentials to the remote DB2 server, depending upon whether the flow was trying to access database 1 or database 2.
This Knowledge Center article covers the integration in more depth: -