How would this differ from when I set them in the code?
I do have $ENV{ORACLE_HOME}, $ENV{ORACLE_SID}, $ENV{LD_LIBRARY_PATH}
set in any code that runs from cron.
On 02-Jul-01 Steve Sapovits wrote:
>
> You can do this nice little Perl trick:
>
> BEGIN
> {
> if ($ENV{LD_LIBRARY_PATH} !~ /oracle.*lib/)
> {
> $ENV{LD_LIBRARY_PATH} = '/oracle/8.0.5/lib';
> exec($^X, $0, @ARGV);
> }
> }
>
> or something similar (e.g., we use a package that appends
> to LD_LIBRARY_PATH if the value isn't already in it).
>
> The exec piece executes your Perl script exactly as you did,
> using the same Perl interpreter.
>
> ----
> Steve Sapovits
> Global Sports Interactive
> Work Email: [EMAIL PROTECTED]
> Home Email: [EMAIL PROTECTED]
> Work Phone: 610-491-7087
> Cell: 610-574-7706
> Pager: 877-239-4003
>
>> -----Original Message-----
>> From: Scott T. Hildreth [SMTP:[EMAIL PROTECTED]]
>> Sent: Monday, July 02, 2001 2:44 PM
>> To: Scott T. Hildreth
>> Cc: [EMAIL PROTECTED]
>> Subject: RE: Problems Running from crontab.
>>
>>
>> I fixed it by setting the 'SHELL=/usr/local/bin/zsh' so
>> the LD_LIBRARY_PATH is getting set before Perl is executed.
>> I'm not sure why the behavior changed, but it works :-)
>>
>> On 02-Jul-01 Scott T. Hildreth wrote:
>> >
>> > I wonder if anyone has run into this problem. I upgrade on of our
>> > production servers to perl5.6.1, DBI-1.18, and using DBD::Oracle 1.06.
>> > I was using DBD::Oracle 1.07, but I went back to 1.06 to see if that
>> > is the problem. Anyway I have jobs that run in cron, in the past if
>> > I set the %ENV Vars, everything ran okay. since I update the Perl and
>> > DBI the following error occurs,
>> >
>> > install_driver(Oracle) failed: Can't load
>> >
>> '/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto/DBD/Oracle/Oracle.so
>> '
>> > for
>> > module DBD::Oracle: libclntsh.so.1.0: cannot open shared object file: No
>> such
>> > file or directory at /usr/local/lib/perl5/5.6.1/i686-linux/DynaLoader.pm
>> line
>> > 206.
>> >
>> > ..It will run from command line, because it is getting the env from the
>> > shell,
>> > but not cron.
>> >
>> > The %ENV vars are set as,
>> >
>> > $ENV{ORACLE_SID} = $ARGV[0];
>> > $ENV{ORACLE_HOME} = '/oracle/8.0.5';
>> > $ENV{LD_LIBRARY_PATH} = '/oracle/8.0.5/lib';
>> >
>> > which worked until the updates. Does anyone know if this a problem with
>>
>> > Perl5.6.1 or DBI-1.18?
>> >
>> > Thanks,
>> > STH
>> >
>> > ----------------------------------
>> > E-Mail: Scott T. Hildreth <[EMAIL PROTECTED]>
>> > Date: 02-Jul-01
>> > Time: 12:14:12
>> > ----------------------------------
>>
>> ----------------------------------
>> E-Mail: Scott T. Hildreth <[EMAIL PROTECTED]>
>> Date: 02-Jul-01
>> Time: 13:40:59
>> ----------------------------------
----------------------------------
E-Mail: Scott T. Hildreth <[EMAIL PROTECTED]>
Date: 03-Jul-01
Time: 06:30:13
----------------------------------