
yakirllc
New User
May 28, 2017, 7:02 AM
Post #1 of 3
(5503 views)
|
Environment Variables
|
Can't Post
|
|
Hi, Is there a way to set new environment varaibles using perl? Using the $ENV is not good enough. Example:
$ENV{"ORACLE_SID"}="test"; print `echo \$ORACLE_SID`; Will return an empty string. Which means, the ORACLE_SID variable wasn't set in the system. The reason I need a way to make it work is because I need to be able to run an Oracle query using sqlplus, and I'm not allowed to use the tnsnames.ora(which will allow me to use the username@InstanceName convention). So my only option is to set the ORACLE_SID variable and then use the sqlplus as follows: sqlplus -S user/passwd @"queryFileName.sql" Thanks for the help.
|