If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 8.1 CLI for Linux - multithreaded/re-entrant ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-10-04, 12:05
colmmagoo colmmagoo is offline
Registered User
 
Join Date: Aug 2004
Posts: 15
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.
Reply With Quote
  #2 (permalink)  
Old 09-14-04, 10:51
hanyheggy hanyheggy is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On