Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: setting ORACLE_SID within PERL
"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