[SunHELP] (no subject)

Laurence H. Cohen lcohen at sec.sprint.net
Wed Apr 3 11:11:45 CST 2002


If you are using a standard install of Solaris 2.6, the default shell 
for root is sh.  To set an environment variable in sh, you have to do 
the following:

ORACLE_HOME=/some_path/8i
export ORACLE_HOME

The command export ORACLE_HOME-/some_path/8i will work in bash and I 
think ksh, but not sh.


Luis Palacios Palomino wrote:

>Hi sun Guru's
>
>I have a perl script that use the DBI perl module to connect to a Oracle db.
>When a run the script in the line command, I have no problems, but when I
>put this in the crontab I get this error:
>
>ORACLE_HOME environment variable not set!
>
>I have set this variable in the /home_user/.profile, in /etc/profile, in
>/etc/default/cron, even I have declare this variable into the script but
>nothing seems to work.
>
>more /etc/default/cron
>CRONLOG=YES
>ORACLE_HOME=/some_path/8i
>
>more /home_user/.profile
>...
>export ORACLE_HOME=/some_path/8i
>...
>
>more /etc/profile
>...
>ORACLE_HOME=/some_path/8i
>export ORACLE_HOME
>...
>
>more perl_script.pl
>...
>my $ORACLE_HOME = "/some_path/8i";
>`export $ORACLE_HOME`;
>...
>
>My system is:
>SunOS hostname 5.6 Generic_105181-17 sun4u sparc
>SUNW,UltraSPARC-IIi-cEngine
>
>Crontab pkg: SUNWcsu
>
>Thanks a lot
>Luis
>_______________________________________________
>SunHELP maillist  -  SunHELP at sunhelp.org
>http://www.sunhelp.org/mailman/listinfo/sunhelp
>
>

-- 
Larry Cohen
Unix Systems Administrator
Sprint Corporate Security
(703)689-6608



More information about the SunHELP mailing list