[SunHELP] (no subject)

Luis Palacios Palomino palacios.la at pucp.edu.pe
Wed Apr 3 11:24:27 CST 2002


Thanks Laurence,

I have already found the solution.
Since I am running a perl script, it seems that perl running in crontab
dosn't load /etc/profile or even /etc/default/cron.
Instead, I have declare the environment variable inside the perl script
using perl syntaxis:

...
$ENV{'ORACLE_HOME'} = "/some_path/8i";
...

Thanks a lot and regards.
Luis

On Wed, 3 Apr 2002, Laurence H. Cohen wrote:

> 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



More information about the SunHELP mailing list