Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: setting ORACLE_SID within PERL
On Sat, 11 Sep 2004 15:57:45 -0400, "hastenthunder"
<hastenthunder_at_hotmail.com> wrote:
>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
>
Actually that's not the Linux command but the *kornshell* command.
You could of course look up the syntax to set an environment variable
in a Perl manual, as this is not an Oracle issue at all.
IIRC it, is just $env("ORACLE_SID") = value, but you'll need to verify
that.
Please bear in mind questions are answered by volunteers, and RTFM-ing
yourself usually will provide a quicker answer.
-- Sybrand Bakker, Senior Oracle DBAReceived on Sat Sep 11 2004 - 15:56:59 CDT