#285 Communication error with DB2

Core (462)

I connect using squirrel sql 2.0 rc1 to DB2 server,
hosted on AIX-UNIX machine,

I open session & execute statments and everything
works fine, untill I leave the squirrel without executing
any statments for around 4 - 6 mins, then I try to
execute any valid statment, I got this error:
Error: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI
Driver][DB2] 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: "recv".
Protocol specific error code(s): "*", "*", "0".

I thought a timeout is set by DB2 admin or something,
but I connect using IBM DB2 command line processor
and no such problem occurs.

I tried also setting the following in Squirrel "File" menu -
> "Global preferences" -> "SQL" tab -> Login timeout
(secs) and set this to zero & sometimes with 20 mins
but the same problem persists. I think it is another
setting as this only for login.

if more details needed, plz contact me


  • Ashraf Fouad

    Ashraf Fouad - 2005-08-10

    Logged In: YES

    I already checked over the Internet before I post this error and
    already have seen the first two posts, but I think they r
    irrelevant to my case, as there are problem in getting a

    Mine is different, mine I have already the connection, & even
    already executing some statment but just leave the Squirel
    without interaction, then try to execute any statment ==> it
    throws this execption.

    Command line processor or the control central shipped by
    IBM in DB2 client are property of IBM & I can't view the
    source code as it is not available.

    Is there anything in SQL that keeps the connection alive,
    maybe this is the problem.

  • Rob Manning

    Rob Manning - 2005-08-30

    Logged In: YES

    OK, here is another data point. I have DB2 PE installed on
    my Windows machine. I connect to it using SQuirreL (on the
    machine). I run a simple query against the sample database and
    it succeeded. I came back several hours later, and ran the
    query successfully. I think we could rule out a SQuirreL -
    JDBC Driver
    interaction problem here, since I would have expected to see
    problem manifested if this were the case. I've read of
    cases where
    a packet filter of some sort (read firewall) timing out the
    idle connections between the database server and the client
    app. Can
    you be sure this is not the case?

  • Ashraf Fouad

    Ashraf Fouad - 2005-08-30

    Logged In: YES

    Sorry as I don't know much about firewalls & network, can u
    just be more specific inorder to ask our network & DB2

    I must point out that it might not be the case, as I have here
    swing application working -done by college in my work-
    works on same DB & it usually works for several hours
    openned without facing this problem, he just get connection
    and put it in custom connection pool of his own.

    All these, and yr last follow up point out on maybe a
    configuration point on my machine in Squirrel is generating
    this problem. I don't know all installed software as the
    machine is prepared with image and everything is setup
    I checked the Drivers defined in Squirrel -as I didn't need
    know how Squirrel determined the path of IBM DB2 client &
    jars automatically- and I found the following in "Java class
    path" tab:
    C:\Program Files\SQLLIB\java\db2java.zip;
    C:\Program Files\SQLLIB\java\runtime.zip;
    C:\Program Files\SQLLIB\bin;

    It has taken all these from environment variable, is it missing
    something I can check?

  • Ashraf Fouad

    Ashraf Fouad - 2005-10-23

    Logged In: YES

    I contacted the admin of the DB2 server, and I found that they
    defined 3 mins as timing for any connection that should be
    active, so any connection should have at least statment
    runing in 3 mins time to be kept alive !!!!!

    I was wondering, if it is possible to make this as feature in
    next release in Squirrel SQL, so that the user can specify a
    sql statment to be run every x secs to keep the connection

    Thanks, and sorry for wasting your time in invistigation, but I
    really didn't know suc setup in our environment

  • Rob Manning

    Rob Manning - 2005-10-23

    Logged In: YES

    No problem. Nice side effect is now I have access to DB2 PE
    for testing. I also added a new RFE for the feature you

  • Rob Manning

    Rob Manning - 2005-10-23
    • assigned_to: colbell --> manningr
    • status: open --> closed-wont-fix

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks