ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Configure DB2 ODBC in IIB on Linux

Post new topic  Reply to topic
 Configure DB2 ODBC in IIB on Linux « View previous topic :: View next topic » 
Author Message
mca
PostPosted: Fri Oct 13, 2017 7:10 am    Post subject: Configure DB2 ODBC in IIB on Linux Reply with quote

Disciple

Joined: 09 Mar 2005
Posts: 196

We are running IIBv10 on Linux environment and the code is trying to connect to DB2 installed on Mainframe. We need to configure odbc.ini file with the DB2 driver info.

https://www.ibm.com/support/knowledgecenter/SSMKHH_10.0.0/com.ibm.etools.mft.doc/bk58060_.htm

The documentation suggests to use the driver from location below, but we do not have this db2 path as we never installed DB2 on Linux.

DRIVER=/opt/IBM/db2/V9.7/lib64/db2o.o

Can someone suggest how to get the DB2 driver on IIB v10.0.0.9 ?


Last edited by mca on Wed Nov 01, 2017 12:52 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
mqjeff
PostPosted: Fri Oct 13, 2017 7:15 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Well.

Perhaps you could install DB2?

Or at least the DB2 Client... ?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
mca
PostPosted: Fri Oct 13, 2017 7:22 am    Post subject: Reply with quote

Disciple

Joined: 09 Mar 2005
Posts: 196

We are currently interacting with other database like SQL and Oracle and never installed any new software/clients for this purpose.

So, we cannot interact with a remote DB2 from IIB without installing a DB2 client ?
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
Vitor
PostPosted: Fri Oct 13, 2017 7:29 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mca wrote:
So, we cannot interact with a remote DB2 from IIB without installing a DB2 client ?


No. IBM supplies sufficient driver software for SQL & Oracle with IIB but not for DB2, which requires the client.

You may speculate on their motives as you wish.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Oct 13, 2017 7:30 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Yes.

IIB comes with presupplied ODBC drivers for other databases, but not for dB2.

Talk to your DB2 admin about how to install what you need.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
mca
PostPosted: Wed Nov 01, 2017 7:39 am    Post subject: Reply with quote

Disciple

Joined: 09 Mar 2005
Posts: 196

We were finally able to install the DB2 client on our Linux server and trying to connect to DB2 on Mainframe. Here is our ODBC configuration..

[ODBC Data Sources]
DB2TEST=IBM DB2 ODBC Driver

[DB2TEST]
Driver=/opt/IBM/db2/V10.5_FP9/lib64/libdb2o.so
Description=IBM DB2 ODBC Database
Database=DTDSND

[ODBC]
InstallDir=/opt/ibm/mqsi/10.0.0.9/server/ODBC/drivers
UseCursorLib=0
IANAAppCodePage=4
UNICODE=UTF-8

After setting the above in odbc file, we are setting the DBParms

mqsistop BRKR1
mqsisetdbparms BRKR1 -n DB2TEST -u DEV1 -p kvr5g
mqsistart BRKR1

I test the connectivity and receive the following error. I tried to debug but cant find what am i missing here...

BIP2393E: Database error: ODBC return code '-1' from data source ''DB2TEST'' using ODBC driver manager ''/opt/ibm/mqsi/10.0.0.9/ie02/lib/libodbcinterface.so''.
The integration node received an error when processing a database operation. The ODBC return code was '-1'. See the following messages for information obtained from the database about this error.
Use the following messages to determine the cause of the error. Typical problems are an incorrect data source, or table names. Correct either the database or the integration node configuration. Use the mqsicvp command to test connectivity to this database.
BIP2322E: Database error: SQL State ''IM004''; Native Error Code '0'; Error Text ''[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed''.
The error has the following diagnostic information: SQL State ''IM004'' SQL Native Error Code '0' SQL Error Text ''[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed''
This message may be accompanied by other messages describing the effect on the integration node itself. Use the reason identified in this message with the accompanying messages to determine the cause of the error. Use the mqsicvp command to test connectivity to this database.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
fjb_saper
PostPosted: Wed Nov 01, 2017 7:46 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20729
Location: LI,NY

To connect to DB2 on the MainFrame from distributed, don't you also need db2connect on top of the client??
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mca
PostPosted: Wed Nov 01, 2017 8:06 am    Post subject: Reply with quote

Disciple

Joined: 09 Mar 2005
Posts: 196

We were told a DB2 client should be enough to get the DB2 drivers installed on Linux (same server as IIB) as they don't come default with IIB software.

/opt/IBM/db2/V10.5_FP9/lib64/libdb2o.so

Please let me if i missing the DB2Connect or something in my odbc configuration.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
fjb_saper
PostPosted: Wed Nov 01, 2017 8:10 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20729
Location: LI,NY

mca wrote:
We were told a DB2 client should be enough to get the DB2 drivers installed on Linux (same server as IIB) as they don't come default with IIB software.

/opt/IBM/db2/V10.5_FP9/lib64/libdb2o.so

Please let me if i missing the DB2Connect or something in my odbc configuration.

The client with the driver is enough to go to a distributed db2. To access a Mainframe db2 from distributed, I believe you will need db2connect on top of it. Check with your mainframe db2 expert... and your db2 dbas for the configuration
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mca
PostPosted: Thu Nov 02, 2017 10:58 am    Post subject: Reply with quote

Disciple

Joined: 09 Mar 2005
Posts: 196

We are able to connect from IIB on Linux to DB2 on Mainframes. Here are the series of steps done to accomplish this. There is no proper documentation on this. So, wanted to post so it is useful to others.

Our Linux OS has only MQ & IIB installed. To connect to remote DB2 Database we needed to install Database client for Drivers and other support.

1. Create a DB2 User 'db2cae' and DB2 group 'db2cae' and add the User to that group with primary GID as db2cae.

groupadd db2cae => Add a group to Linux
useradd db2cae => Add a local user to linux
usermod -G db2cae db2cae => Add the local user to group
id db2cae => Displays the ID and groups it is associated to
vi /etc/passwd => Change the GID of user

2. Create a Filesystem on Linux to support DB2:

/opt/IBM/db2 with 2GB of free space to be created on the server(s)
/db2sup with 3GB of free space to be created on the server(s)

3. Download Database Client:

http://www-01.ibm.com/support/docview.wss?uid=swg24044110

Select your Operating System -> IBM Data Server Client
Select -> Continue -> HTTPS Browser
Moved the software to /db2sup as we created file system earlier

4. Install Database Client:

unzip and untar the file downloaded
cd client
./db2_install
Selected the directory created earlier on filesystem
/opt/IBM/db2

5. Created a DB2 instance as 'root' user:

[root@Linux:/opt/IBM/db2/instance] # ./db2icrt -u db2cae db2cae

6. Run DB2 Catalog commands as 'root' user:

./db2 catalog tcpip node GWDSND remote CADTDSND1 server 50000 REMOTE_INSTANCE DB2 system PADTDSND1 ostype WIN => Create Catalog node to Db2 connect
./db2 catalog database PADTDSND as TEST at node GWDSND authentication server => Cataloged a DB using the DB2 connect node
./db2 connect to TEST user DB2User
<enter password>
./db2 connect reset

7. Configure odbc.ini file:

[ODBC Data Sources]
TEST=IBM DB2 ODBC Driver

[TEST]
Driver=/opt/IBM/db2/lib64/libdb2o.so
Description=IBM DB2 ODBC Database
Database=CADTDSND
HostName=DB2_Mainframe_Server
PortNumber=50000

8. Run the mqsidbparms:

Stop Broker
mqsisetdbparms BRKR1 -n TEST -u DB2User -p DB2Pass
Start Broker

9. Test DB2 connectivity:

mqsicvp BRKR1 -n TEST
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Configure DB2 ODBC in IIB on Linux
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.