Re: I have a weird issue with a script running under cron

John D Groenveld <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <[email protected]>
In message <[email protected]>, Bruce J
ohnson writes:
>Via cron (with the Oracle environment variables set as in the script in questi
>on, please read the OP!):
>
>SHELL=/bin/sh
>USER=root
>LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib
>ORACLE_SID=PHMWEB
>PATH=/usr/bin:/bin
>PWD=/root
>HOME=/root
>SHLVL=2
>LOGNAME=root
>ORACLE_HOME=/usr/lib/oracle/11.2/client64
>
>
>	linux-vdso.so.1 =>  (0x00007fff33dff000)
>	libocci.so.11.1 => /usr/lib/oracle/11.2/client64/lib/libocci.so.11.1 (0
>x
>00007ff92b1e0000)
>	libclntsh.so.11.1 => /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.
>1
> (0x00007ff92894e000)


/tmp/test.sh
#!/bin/ksh
export ORACLE_HOME
ORACLE_HOME=/usr/lib/oracle/11.2/client64
/tmp/dbi.pl


/tmp/dbi.pl
#!/usr/local/bin/perl -w
use DBI;
my $dbh = DBI->connect( "dbi:Oracle:PHMWEB", "scott", "tiger",
                       { RaiseError => 1 } );
$dbh->disconnect;


$ /bin/env -i /tmp/test.sh

John
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.