Re: V7.2 and threads (non-threads safe?)

From: Scott Urman <surman_at_oracle.com>
Date: 1995/12/04
Message-ID: <49vcda$fmb_at_inet-nntp-gw-1.us.oracle.com>#1/1


In article <49q92u$mcl_at_spruce.citicorp.com>, renato.ghica_at_citicorp.com (Renato Ghica) writes:
|> I'm trying to use ORACLE v7.2 on sunOS 4.1.3 with threads. I'm using
|> DCE, but basically what I have is multiple threads doing database
|> updates from within one process. I'm using pro*c.
|>
|> Currently, data is getting corrupted in the oracle database. Probably
|> because I'm not doing things (or the oracle server is not doing things)
|> in a thread-safe way.
|>
|> Is there any way to do this? Do I need another oracle version? or are
|> there installation options I can play around with? Maybe starting
|> up more db servers or soemthing?
|>
|> thanks fow ANY help!
|>
|> -rg
|>
Oracle 7.2 is NOT thread safe. The client libraries for Oracle 7.3 will be. Having said that, you can still write multi-threaded programs with Oracle 7.2. Make sure that each thread has a separate connection. In Pro*C, if you have more than one thread in the same source module, use the AT clause for each one with a different name to insure that each will have a different connection. You also should mutex all of your SQL statements to insure that a thread doesn't get swapped out during execution of SQL.

In 7.3, you will be able to pass context information among threads (and therefore share a connection), and the mutexing restriction is less. Received on Mon Dec 04 1995 - 00:00:00 CET

Original text of this message