Hi All,
I've got a script that makes a call to an oracle database. It just attempts to open a handle...thats it:
----
#!/usr/perl5/5.8.4/bin/perl -w
use DBI;
$host = "bo.boo.com";
$sid = "AAAA";
$user = 'secret';
$passwd = 'evenmoresecret';
$dbh = DBI->connect("dbi:Oracle:host=$host;sid=$sid", $user, $passwd);
$dbh->disconnect;
---
Now if I run the script in shell where I have LD_LIBRARY_PATH environment variable defined it works just peachy.
However if I don't first define LD_LIBRARY_PATH in the shell I get the following error:
---
install_driver(Oracle) failed: Can't load '/usr/perl5/site_perl/5.8.4/
+sun4-solaris-64int/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle:
+ ld.so.1: perl: fatal: libclntsh.so.10.1: open failed: No such file o
+r directory at /usr/perl5/5.8.4/lib/sun4-solaris-64int/DynaLoader.pm
+line 230.
at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
Perhaps a required shared library or dll isn't installed where expecte
+d
at ./test2.pl line 12
--
I've tried inserting:
--
BEGIN {
$ENV{'LD_LIBRARY_PATH'}='/local/src/local.perl/oracle/instantclient_10
+_2';
}
--
at the beginning of by script but the result is the same error as I see if I have an undefined LD_LIBRARY_PATH.
Any suggestions as to what I'm missing here?