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 -> Re: calling 'C' external procedures from Oracle from HPUX

Re: calling 'C' external procedures from Oracle from HPUX

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 18 Feb 2005 08:06:14 -0800
Message-ID: <1108742774.933658.275230@l41g2000cwc.googlegroups.com>

Thomas Kyte wrote:
<snip>
> You do realize the plsql environment will be the SERVERS environment
-- not the
> clients in general. So, the environment variables you are accessing
would
> really be "constants", inherited from the listener (if you use
dedicated server
> over the network), inherited from the user that started the database
(if you use
> shared servers), inherited from your client application only when you
use
> dedicated server and a fork/exec (bequeath/local) connection -- no
net.
>
>
> And not only that, but the external procedures environment will
always be
> inherited from the listener since the listener forks off the extproc
process.
>
> So, the environment would be the constant environment of the listner
process if
> you used an external procedure.
>
> It would be "sketchy" as to whose environment it would be using a
java stored
> procedure.

On Windows, it uses server's SYSTEM environment via Java's Runtime class. i.e. Path did not include the USER's path settings... which are appended at the end of the system path if you type path from cmd.exe. Don't know if this is standard. I used this Java stored procedure,

public class RuntimeTest {

   public static void Test ( )

      throws Exception {

      Runtime r = Runtime.getRuntime();
      Process p = r.exec("cmd /c echo %path%>C:\\temp\\path.txt",
null);
      p.waitFor();

   }
}
Didn't have JServer installed on AIX database so cannot test the Unix behavior.

>
> The only safe thing I think you should do is have the shell script
pass the
> values into the database itself. Formal parameters to your sqlplus
script if
> that is what you are using.

Regards
/Rauf Received on Fri Feb 18 2005 - 10:06:14 CST

Original text of this message

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