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: setting ORACLE_SID within PERL

Re: setting ORACLE_SID within PERL

From: Ana C. Dent <anacedent_at_hotmail.com>
Date: Sat, 11 Sep 2004 21:16:55 GMT
Message-ID: <Xns95619148D64D5SunnySD@68.6.19.6>


"hastenthunder" <hastenthunder_at_hotmail.com> wrote in news:_MI0d.1231$Ny6.2302_at_mencken.net.nih.gov:

> Hi gurus,
>
> I need to be able to set Linux's environment variable for Oracle
> within a PERL script.
> The Linux command to set environment variable is "export".
> So I tried to set it using the system() command:
>
> system('export ORACLE_SID = TEST');
>
> But that did not seem to work, the script just continues to execute
> without actually changing the environment variable.
>
> Any help would be greatly appreciate!
>
> Gordon
>
>

Keep in mind that *nix is a quirky beast. Each command runs as a separate process. At the *nix command line even if you execute a script which contains
export ORACLE_SID = TEST
the variable will NOT be set in your ( the calling/parent) process. You'd need to "source" in the script to get it to impact calling process.

HTH Received on Sat Sep 11 2004 - 16:16:55 CDT

Original text of this message

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