Home » Developer & Programmer » Precompilers, OCI & OCCI » Problems using OCI in multithreaded environment
Problems using OCI in multithreaded environment [message #109861] Tue, 01 March 2005 09:46
cmaryus
Messages: 1
Registered: March 2005
Location: Timisoara, Romania
Junior Member

Hi

I have developed an application in C++ that runs multiple threads on multiple OS's (WinXp, Linux, UNIX). Each thread opens a separate session to the database (OCIServerAttach then OCISessionBegin). In the main application thread I create an environment handle with OCI_THREADED mode (OCIEnvCreate). This handle is then passed to each thread.

Each thread call various SQL stored procedures with 1 or more parameters.
The problem is: when the number of runnig threads is growing, in Oracle db the stored procedures called from my threads have NULL parameters. But I never send NULL parameters, I checked that very clearly.

I managed to save the problem using OCCI instead of OCI. But here I have another problem: I cannot compile OCCI on UNIX AIX with gcc !!! Sad Sad . I installed last version of gcc from gcc.gnu.org (3.4.3) and no chance. From what I read on the other forums it seems that gcc does not support OCCI on UNIX AIX only a dedicated compiler xlc++. Indeed I downloaded a trial version and is working in this way, but this is not a solution for me because I cannot spend 3.000 USD on this compiler.

So I'm stuck. I see 2 options:

1. Make the application run properly with OCI
2. Workaround in order to compile OCCI on UNIX AIX (5.2)

I would appreciate help on any of these solutions.

Marius
Previous Topic: how to display info from host structure pointer
Next Topic: How to connect to oracle using 'C'
Goto Forum:
  


Current Time: Thu Nov 26 18:46:18 CST 2020