Precompilers and OCI (MOSC)

MOSC Banner

OCIStmtFetch2 problem in multi-threaded C++ environment on Solaris

edited Jan 12, 2011 10:41PM in Precompilers and OCI (MOSC) 6 commentsAnswered
On both Oracle 9 and 10 we have been struggling with a problem related to OCIStmtFetch2 in multithreaded C++ applications on Solaris.
The problem occurs with single column queries returning one number.

When the application is only light loaded (no simultaneous threads) we get correct data back from OCIStmtFetch2.
When the application is heavily loaded (multiple simultaneous threads), the buffer previously defined with OCDefineByPos remains unchanged for some of the calls.

Until now we have workarounded the problem by mutex-protecting the Execute and Fetch phases in our queries, but now we would like to take full benefit of the multi-threaded environment.
We can also bypass the problem by inserting sleep pauses or other extra code before OCIDefineByPos.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center