Visual Studio 2005  Connection to DB2 on IBM i5

Posted on 2008-11-18
Last Modified: 2013-11-27
I'm a windows programmer tryng to establish a data connection to a DB2 instance on an IBM i5 series machine.  I talked to the IBM support center, and followed the guidelines by installing the required iSeries ODBC drive and accompanying Visual Stuido 2005 Add-Ins as detailed in the following reference doc:

But - when I try to establish a connection using the server IP address and database name - I keep getting the following connection error message:  

Error opening connectionERROR [08001] [IBM] SQL30081N  A communication error has been detected.  Communication protocol being used: "TCP/IP".  Communication API being used: "SOCKETS".  Location where the error was detected: "".  Communication function detecting the error: "connect".  Protocol specific error code(s): "10061", "*", "*".  SQLSTATE=08001

According to my IT guys, there is no firewall blocking and all ports should be open to receive.  How can I check the actual connection is working/listenting on TCP/IP as well as on sockets?  From the error - it seems as though the DB2 instance on the i5 series is not listening on TCP/IP and needs to be.  Any ideas on how I can get this connection to work?  

thanks in advance for any help with this.
Question by:coecho
    LVL 37

    Expert Comment

    i guess you need to look on the i5 and run the equivalent command of netstats -an
    to see which ports are being listened to

    Author Comment

    I don't know the i5.  What is the equivalent of netstats on the i5 and how would you run it?  

    Author Comment

    It looks like it is listening on port 446.  Now when I try to connect - I'm getting the following error message:

    ERROR [42968] [IBM] SQL8002N An attempt to connet to a host failed due to a missing DB2 Connect product or invalid license SQLSTATE=4296B
    LVL 3

    Accepted Solution

    That error message says its a License issue.
    perhaps you do not have a SQL license on your iSeries.

    Author Comment

    Does DB2 Connect need to be installed on the i5 - even if I want to connect via the i5 ODBC iSeries ODBC driver instead?  When I talked with IBM support, they recommded iSeries driver over DB2 Connect.  So - I guess I don't understand if I'm using the correct driver in order to connect via VS 2005 and DB2?  I'm using the "IBM DB2, IDS and U2 Data Provider for the .Net Framework as my Data Source, as detailed in the document IBM support sent me - but now this doesn't seem like the correct Data Source to use and I don't see an option for the iSeries Access ODBC Driver in the Data Source option list from Visual Studio 2005.

    Expert Comment

    This one really hasn't been closed, has it? coecho, did you get it working?

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
    For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now