Results 1 to 15 of 15
  1. #1
    Join Date
    Mar 2002
    Posts
    11

    Unanswered: DB2 Client Configuration on Linux

    I am new to DB2, so bear with me if my questions sound dumb
    I need to be able to connect from a Linux server to a DB2 database running on iSeries (AS/400). My UNIX admin has installed a Client on the server, but apparently it is not fully configured - there is nothing in
    /opt/ibm/db2/V9.5/install ,
    no instance was created, and if I try running any commands, e.g.,
    /opt/ibm/db2/V9.5/bin]$ ./db2 catalog ,
    I get error:
    SQL10007N Message "-1390" could not be retrieved. Reason code: "3".
    What do I need to do? Run this
    [/opt/ibm/db2/V9.5/instance]$ ./db2icrt
    as root?
    And add service to /etc/services ?
    Anything else?

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    For the install of the client, you are on the right track, but look in the documentation for installation instructions.

    You will also need DB2 Connect (of just DB2 Connect) to get to DB2 iSeries or DB2 on z/OS. However, you may be able to find a product with a temporary trial license.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Mar 2002
    Posts
    11
    With all due respect, why do I get the feeling that this is massively more complicated than doing it in Windows? In Windows all I had to do is to install a iSeries ODBC driver (under 1 minute) and that was that.
    Ultimately all I am trying to do is to enable perl scripts to run queries on that DB on iSeries - connect, retrieve some data, pass it on to some other processes. So first I had to install special perl modules. This, in turn, required installation of a DB2 Client (either runtime or larger) plus upgrading some related RedHat packages. And now I have to get this whole middleware set - and pay additional license? - just to be able to do that?

    Perhaps I did not make myself clear in the first place. This is just a client install. Why would it be so infinitely more complicated than Oracle or Sybase?

    OK, I am done ranting, and will start reading. But the points above (minus emotions of course) are valid.

    Here is what I need in terms of perl modules:
    http://www.ibm.com/developerworks/da...512greenstein/
    Here is the perl module installed:
    http://www.nntp.perl.org/group/perl....01/msg394.html
    Here are the DB2 Clients:
    http://www-01.ibm.com/support/docvie...id=swg21385217
    All these things above did not say anything about DB connect.. is there not a way to avoid that?
    Last edited by v8625; 03-21-10 at 01:29.

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Whether or not you need DB2 Connect is not the fault of DB2 Linux, UNIX, Windows (or any DB2 LUW clients). It is the fault of DB2 iSeries which requires a license for DB2 Connect to connect to their database from a non-iSeries client (AFAIK). This is for licensing (money that IBM wants you to pay them) purposes, not technical reasons. Same is true for DB2 z/OS, IBM wants extra money. DB2 Connect is not needed when connecting to DB2 LUW database.

    Can you connect from Oracle or Sybase to the DB2 iSeries database without DB2 Connect?

    I am not at all familiar with Perl accessing DB2, but the example web links you provided seem to be accessing a DB2 LUW database, not DB2 iSeries.

    Many companies have a DB2 Connect (multi-user license) Gateway machine already set up on UNIX, Linux, or Windows that lets you connect to the Gateway without having DB2 Connect on each client, and then the DB2 Connect Gateway machine has the iSeries databases cataloged as remote databases. I would talk to others who have accessed DB2 iSeries in your company from Linux, UNIX, or Windows. I was not aware that you could use an ODBC driver with DB2 iSeries without a DB2 Connect License. Are you sure there is not DB2 Connect software on your Windows client, or that you are not using a DB2 Connect Gateway?

    One thing to keep in mind is that DB2 iSeries is a completely different product than DB2 LUW, despite their "DB2" names. Oracle marketing makes a big deal about this, but of course they don't have a version of Oracle that even runs on iSeries.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Mar 2002
    Posts
    11
    Thank you,
    This sounds like a potential breakthrough for me - if there is indeed the possibility of authenticating on some DB2 Connect Gateway instead of paying another License. It is very likely that my company already has a Global License - but I can't be too sure until I find out for sure (which is a separate project).
    The reason I think we have that Global License is that we have a few of these iSeries boxes globally, and all the Windows machines here as part of a standard install image have this "iSeries Access ODBC Driver", version 11.00.09.00 by IBM Corporation, file name CWBODBC.DLL, dated 2007/09/03. This is the one that provides direct connections to iSeries databases - straight from Excel for example.
    I did traceroute on a couple of addresses shown in ODBC connections and the hop or IP address just before the IP address of the actual database server has the same IP address for all of them. Perhaps that is the DB2 Gateway?

    In any case, whether of not this is DB2 Connect Gateway (which is something I would have to find out internally), I still need to set up the instance.

    Does this instance need to have something meaningful in the name, like the server it would be pointing to? If yes, do I need to set up a bunch of instances - each one pointing to a particular server? Or is that specified somewhere else?

    And then I am not too sure what to add in terms of service to /etc/services - I have four of these servers (three use the same port, and the fourth a different one - all port numbers are in around 43000)

    And then somehow somewhere all these are supposed to point to this DB2 Gateway somehow - that is still a mystery.

    Also, I think I need to provide a clarification - I didn't mean that I could connect to DB2 on iSeries using Sybase or Oracle drivers - I just meant that setting up clients to connect ot Sybase or Oracle databases is trivial - no comparison. And in terms of using perl for working with connections, this
    is just another layer - before moving on to perl, I definitely need to be able to connect from shell using some db2 commands.

  6. #6
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by v8625 View Post
    Also, I think I need to provide a clarification - I didn't mean that I could connect to DB2 on iSeries using Sybase or Oracle drivers - I just meant that setting up clients to connect ot Sybase or Oracle databases is trivial - no comparison. And in terms of using perl for working with connections, this
    is just another layer - before moving on to perl, I definitely need to be able to connect from shell using some db2 commands.
    Yes, I knew exactly what you meant. Connecting to DB2 for Linux, UNIX, and Windows (any of these DB2 platforms) is equally as simple. Connecting to DB2 iSeries is a different story, since DB2 for iSeries is a completely different product, and very few people who contribute to this forum use it or know much about it. You can complain all you want, but it is easier to connect to DB2 iSeries than it is to Oracle for iSeries or Sybase for iSeries (since those products do not exist).

    Regarding whether your company has a DB2 Connect Gateway, or DB2 Connect already installed on your Windows client, your should ask someone in your company, probably your DBA. It is kind of ridiculous for us to speculate about how your company has things set up.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  7. #7
    Join Date
    Jan 2009
    Location
    Zoetermeer, Holland
    Posts
    746
    When I was faced with the same problem, this DB2 Version 8 Connectivity Cheat Sheet was a life saver.

  8. #8
    Join Date
    Mar 2002
    Posts
    11
    Thank you - I got the point, DB2 connect is not optional when dealing with iSeries. I think my UNIX admin got hold of the DB2 DBAs - I'll be back with the results (or more questions) soon.

  9. #9
    Join Date
    Mar 2002
    Posts
    11
    There appear to be no other UNIX/Linux servers at my organization that would require connectivity to DB2 on iSeries. Which means there are most likely no installs of DB2 Connect anywhere.

    All the windows boxes that I am aware of here connect to DB2 (on iSeries)
    using either ODBC Driver I mentioned earlier
    IBM i information center
    which I think is part of IBM AS400 Client Access Express:
    iSeries Information Center
    or ShowCase ODBC drivers, v.7.00.280.10 by ShowCase Corporation dated 2006/05/16 .

    In any case, for Linux, it appears that there are no DB2 Connect Gateways.

    Which brings the next question - which version of DB2 Connect do I need? My take is that I need Personal Edition:
    DB2 Database for Linux, UNIX, and Windows
    since I only need to enable this one user account on one particular Linux server (actually, if I also want to install this on
    the back-up server, I would need another license, wouldn't I?) to connect to half-a-dozen DB2 boxes (all on iSeries).

    If that is indeed the case, I have two additional questions - so all I have to do now is pay $530?
    IBM - DB2 Connect Personal Edition - Software

    And, if yes, what is the sequence of actions after that - should I complete the operations with the DB2 Client driver configuraion
    that I have not yet completed - see above:
    - setting up an instance by running /opt/ibm/db2/V9.5/instance$ ./db2icrt (as root?)
    - adding service to /etc/services (what do I actually put in there?)
    - and then install this DB2 Connect driver
    DB2 Database for Linux, UNIX, and Windows

    Is that all?

    And finally, I have an additional (silly) question - where in all this picture these iSeries Access for Linux drivers fit in:
    ftp://ftp.software.ibm.com/as400/pro..._for_linux.pdf
    These seem to be a completely different development - looks like these are based on unix-ODBC:
    IBM iSeries Access for Linux Home Page
    Most importantly, these don't require licencing:
    http://www.redbooks.ibm.com/redbooks/pdfs/sg246551.pdf

  10. #10
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I don't know anything about UNIX odbc, especially to iSeries, but you should be able to find a Try and Buy copy of DB2 Connect that has at least a 30-day free license for you to try it out.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  11. #11
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    I have not tried this myself, but see if this link helps

    IBM iSeries Access for Linux - Installation and Usage Guide
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  12. #12
    Join Date
    Mar 2002
    Posts
    11
    I read a little bit more about these System i Access ODBC drivers, and it looks like these have some serious limitations as compared to the DB2 Connect/DB2 Client Driver combo: "iSeries Access for Linux 64-bit currently only provides an Extended Dynamic Remote SQL (EDRS) driver. It is supported only on SuSE SLES 9..." -
    IBM iSeries Access for Linux - Installation and Usage Guide - and my Linux box is 64-bit and it is RedHat - not SuSe.

    I think the DB2 Connect/DB2 Client Driver combo is probably the only way for me to go at this point. I will look for a Try and Buy copy of DB2 Connect as recommended, but I would also still like to clarify the sequence of steps I need to take after I dowload that DB2 Connect:

    - set up an instance by running /opt/ibm/db2/V9.5/instance$ ./db2icrt (as root?)
    - add service to /etc/services (what do I actually put in there?)
    - and only then install this DB2 Connect driver

    Thanks.

  13. #13
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by v8625 View Post
    I think the DB2 Connect/DB2 Client Driver combo is probably the only way for me to go at this point. I will look for a Try and Buy copy of DB2 Connect as recommended, but I would also still like to clarify the sequence of steps I need to take after I dowload that DB2 Connect:

    - set up an instance by running /opt/ibm/db2/V9.5/instance$ ./db2icrt (as root?)
    - add service to /etc/services (what do I actually put in there?)
    - and only then install this DB2 Connect driver

    Thanks.
    Follow the installation instructions provided with the product. Sometimes it changes from one release to another.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  14. #14
    Join Date
    Mar 2002
    Posts
    11
    Here is one useful piece I got through further reading of documentation:
    "DB2 Connect™ Personal Edition: This product is a superset of the IBM Data Server Client"
    - IBM DB2 9.7 for Linux, UNIX and Windows Information Center

    This means that the IBM Data Server Client I installed was not necessary, and the answer to all my questions on whether I need to configure that IBM Data Server Client *before* or *after* installing DB2 Connect is not before or after, but instead, that is, I need to install DB2 Connect *instead* of IBM Data Server Client .

    So now I just have to follow the DB2 Connect installation instructions. I did find the Try/Buy version:
    IBM - DB2 Connect Personal Edition V9 Trial Licenses
    So all I have to do now is install DB2 Connect, download latest fixpack, and register this license? Or are there any other tricks I need to know?
    Last edited by v8625; 03-26-10 at 21:46.

  15. #15
    Join Date
    Sep 2012
    Posts
    1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •