Home: Perl Programming Help: DBI:


Mar 12, 2010, 7:57 AM

Views: 9291

I have a script that connects to a oracle DB using the following string:

unless ($dbh = DBI->connect ("dbi:Oracle: host=$ORACLE_HOME;sid=$ORACLE_SID;port=$ORACLE_PORT", $ORACLE_USERID, $ORACLE_PASSWORD)) {
print "Failed to login to the database";
$dbh = undef; return 'FAILED';

For some reason the script works fine on one machine but when executing on a second machine I receive the following popup error:

The procedure entry point OCIIntervalToText could not be located in the dynamic link library OCI.dll.

And the script command line return the error

install_driver(Oracle) failed: Can't load 'C:/Perl/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified procedure could not be found at C:/Perl/lib/DynaLoader.pm line 201.
at (eval 8) line 3
Compilation failed in require at (eval 8) line 3.
Perhaps a required shared library or dll isn't installed where expected at C:\oracle.pl line 165

I verified the versions of DBD::Oracle, OCI.dll on both systems and they are identical. Any thoughts as to what else can cause this problem?



Mar 22, 2010, 11:42 PM

Views: 9104
Re: [ms10380] DBI::Oracle

as the error describes

Can't load 'C:/Perl/lib/auto/DBD/Oracle/Oracle.dll'

check for this file existence. look like the DBD::Oracle was not installed properly on the second machine.

The most rough way for windows (as possible solution) could be simple sync of C:/Perl/lib/ folder contents on both machines (or just copy the folder from good one to problematic one). If it does not help try to reinstall DBD::Oracle package due to it may use some libraries located in the system folders.