Re: Multi-threaded 7.3 OCI Question

From: Scott Urman <surman_at_dlsun338.us.oracle.com>
Date: 1996/07/25
Message-ID: <4t8alf$7m0_at_inet-nntp-gw-1.us.oracle.com>#1/1


In article <4t5ob3$sb9_at_teal.csn.net>, bhays_at_csn.net (Boyd Hays) writes:
|> I'm trying to use the thread-safe mode of Oracle's OCI 7.3.
|> The documentation states that there are three requisites:
|> 1. Use olog() instead of orlon().
|> 2. The hda must be initialized to zeros.
|> 3. The function opinit() must be called to setup
|> Oracle's use of threads.
|>
|> I cannot find the opinit() function in either the shared
|> object version of the client library or in any of the
|> static libraries. Does anyone know where this function lives?
|> At what revision level of the 7.3 libraries was it included?

This function was mistakenly left out of the 7.3.2.1 Solaris release. Contact Support and request Solaris patch 369571 for base bug 366174.

|>
|> Also, does anyone know if Oracle allocates thread-local
|> storage in a connection specific way? My application's design
|> uses a pool of threads on Solaris 2.5.1 and at runtime any
|> of those threads can be used to service an OCI request. My
|> concern is that I may need to restrict all activity for a
|> specific connection to the same thread that is in turn
|> bound to its corresponding Oracle thread.

You shouldn't have to do this. All context information for a connection is stored in the LDA and HDA. You can establish a connection, use it in one thread, and continue to use it in another thread. Just pass the LDA and HDA from one to the other. Check the OCI 7.3 manual for more details, and an example which does this.

|>
|> Thanks in advance,
|> Boyd Hays -- bhays_at_csn.org
|>



Scott Urman Oracle Corporation surman_at_us.oracle.com

Author of _Oracle PL/SQL Programming_ ISBN 0-07-882176-2 Published by Oracle Press - http://www.osborne.com/oracle/index.htm

"The opinions expressed here are my own, and are not necessarily that of  Oracle Corporation"
Received on Thu Jul 25 1996 - 00:00:00 CEST

Original text of this message