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: Sybrand Bakker <sybrandb_at_hccnet.nl>
Date: Sat, 11 Sep 2004 22:56:59 +0200
Message-ID: <8gp6k0djjergjs4gv3epp8bdi0bfa46cj3@4ax.com>


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 DBA
Received on Sat Sep 11 2004 - 15:56:59 CDT

Original text of this message

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