Re: Threaded Database Access

From: Cary B. O'Brien <cobrien_at_access2.digex.net>
Date: 1996/08/03
Message-ID: <4u0u7s$gm3_at_access2.digex.net>#1/1


In article <4t83du$2s0_at_charnel.ecst.csuchico.edu>, Chris Hafey <chafey_at_ecst.csuchico.edu> wrote:
>In article <31F63380.5B85_at_csdejolt.ddc.cio.eds.com>,
>Barry Johnson <bjohnson_at_csdejolt.ddc.cio.eds.com> wrote:
>>Does anyone know if it is possible (or not), to make a connection to
>>Oracle and thread a routine that selects (or inserts) data from a
>>database. I'm concerned that Oracle can not handle multiple queries at
>>the same time with the one connection. TIA!
>
>I suppose you could open multiple cursors on one connection. Transaction
>control is based on a connection and not a cursor. This means that you would
>lose transaction control if you were performing unrelated operations in
>each cursor (thread). I am fairly certain that the newer oracle releases
>have MT-Safe oci libraries, but I haven't tried it myself.
>

I believe this is correct. 7.2.x oracle libraries are not thread-safe, but 7.3.x is supposed to be.

We access oracle from a threaded application under HPUX 10.01, but we have a single connection to the database, and accesses are serialized with a mutex. I.e. a thread must lock the mutex, do everything it wants to do, commit, and then release the lock. Seems to work for us. (oracle 7.2.3).

Check with an altavista search of usenet for oracle and threads to find out more.

  • cary cobrien_at_access.digex.net
Received on Sat Aug 03 1996 - 00:00:00 CEST

Original text of this message