Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    15

    Unanswered: DB2 8.1 CLI for Linux - multithreaded/re-entrant ?

    Hi,

    I have an application that connects to DB2 8.1 server on Redhat Linux ES 3; it uses the DB2 8.1 CLI to talk to the DB2 server. This application serves as an intermediary (middleware) for client apps that connect to it via odbc.

    |Client|-----ODBC----->|Application|----DB2 CLI---->|DB2|

    When a client app exits, my application stops the thread that has been servicing the client. (I'm using the ACE framework). At that point, I see the following error message in db2diag.log:

    ------------------------------------BEGIN DB2DIAG.LOG SNIPPET----------------------------------------------

    2004-09-09-18.34.23.415575 Instance:db2inst1 Node:000
    PID:2994(db2agent (NAVYA)) TID:3021703520 Appid:*LOCAL.db2inst1.064700013347DRDA Communication Manager sqljcReceive Probe:30 Database:NAVYA

    CCI Error:
    0xBFFF64E0 : 0x00000047 G...

    2004-09-09-18.34.23.431372 Instance:db2inst1 Node:000
    PID:2994(db2agent (NAVYA)) TID:3021703520 Appid:*LOCAL.db2inst1.064700013347DRDA Communication Manager sqljcReceive Probe:30 Database:NAVYA

    DIA0001E An internal error occurred. Report the following error code :
    "ZRC=0x8136001C".

    2004-09-09-18.34.23.454892 Instance:db2inst1 Node:000
    PID:2994(db2agent (idle)) TID:3021703520 Appid:*LOCAL.db2inst1.064700013347
    data protection sqlpterm Probe:3200

    Database shutdown with next LSN of 000000000426800C.

    ------------------------------------------END DB2DIAG.LOG SNIPPET--------------------------------------------

    Subsequent client connections to my application can no longer access db2. Interestingly enough, if I SIGKILL my application just after the client has recieved the results of the query, I get the same above message from DB2. So my client going away and SIGKILLING the application have the same effect on DB2.

    My application does not encounter this problem on Solaris or AIX, so I am wondering if this may have to do with the multithreadedness (or lack thereof) of the DB2 8.1 CLI for Linux ?

    Does this kind of error look familiar to anyone ?

    Thanks for any advice,
    Colm.

  2. #2
    Join Date
    Jan 2004
    Location
    Egypt
    Posts
    61
    i had done mulit-threaded application under linux with DB2 in two different ways:

    1st:
    using embeded SQL with C and i need to used -DREENTANRANT FLAG while compliing, another issue i had to use what so called DB2 contexet to allow my application to access DB2 in multi-threaded
    u can check the sample DB2 mulit-threaded code
    by the way if u try to access db2 in mulit threaded program without using Context concept, your program will hang

    2nd:

    using unixODBC mulit-threaded application which use DB2 CLI as db2 ODBC dirver, this will work normally with standrad ODBC calls, but u still have to use THREAD_SAFE, RENTRANT FLAGS
    hany heggy,
    IBM certified Professional, AIX system support
    www.melodyhits.tv

Posting Permissions

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