Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> External procedures and execution context

External procedures and execution context

From: SM <smanduk_at_profidata.com.pl>
Date: Tue, 20 Nov 2001 09:37:25 +0100
Message-ID: <9td4rc$plf$1@news.tpi.pl>


Hi!

We have to implement communication from Oracle PL/SQL level to external data sources (on another host). Because we have already developed number of communication procedures in C language, natural way of solving our problem is to use external C library.
We want to implement one function for opening connection, another one for closing it, and set of various other functions for communication tasks. In this approach it is natural to use global variables in external library (for holding connection descriptor for example). But according to Oracle documentation, there is no guarantee that external library will remain loaded between calls to different functions, and usage of global variables is strongly discouraged. In fact (I have checked this) at last on HP-UX, external library stays loaded between different call to their function, but I don't want relay on an undocumented behaviour. Could elaborate on when external libraries are unloaded especially on Solaris and also on HP-UX?

Second option is not to use global variables in external library and hold connection descriptor and other data in PL/SQL structure, and then pass it to every function call? In this approach however, it is necessary to guarantee that even if external library will be unloaded between calls, it will be executed within the same process environment, each time when it will be loaded again. I'm not sure whether I can rely on such assumption?

I'll appreciate any suggestions!

TIA Simon Received on Tue Nov 20 2001 - 02:37:25 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US