Reputation: 143
I have a Perl Script that I've written that connects to Oracle. The script works perfectly on my machine with PERL64 installed. I tried to turn this script into an EXE using ActiveState PerlApp. Again, works perfectly on my machine. Once the executable is on a machine that does not contain Perl it is missing DLL's needed to connect to Oracle.
use DBI;
# CONFIG VARIABLES
our $database = "database.app.net";
our $host = "server.app.net";
our $port = "1522";
our $user = "SVC_app";
our $pw = 'Password';
# DATA SOURCE NAME
our $dsn = "dbi:Oracle:$host:$port/$database";
# PERL DBI CONNECT
our $connect = DBI->connect($dsn, $user, $pw);
# PREPARE THE QUERY
our $query = 'SELECT Blah FROM database."table" where "blah" = ?';
our $query_handle = $connect->prepare($query);
# EXECUTE THE QUERY
$query_handle->execute($value);
# BIND TABLE COLUMNS TO VARIABLES
$query_handle->bind_columns(undef, \$return);
# LOOP THROUGH RESULTS
while($query_handle->fetch()) {
#print "$return";
}
The error i receive is :
Can't load 'auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified module could not be found at/DynaLoader.pm line 224.
Thanks in advance
Upvotes: 0
Views: 564
Reputation: 54
You need to separately install the Oracle client on any machine that you are running your EXE on.
PerlApp in the ActiveState's PDK will not wrap Oracle clients into the EXE because doing so will violate Oracle's re-distribution agreement.
Upvotes: 1
Reputation: 3541
There are two cases:
Also, keep in mind that Window is a bit picky about DLL files. It may say that Oracle.dll is missing, but what is actually missing may be one of its dependencies. Maybe OCI.dll ? And if you have more than one DLL file with the same name, try and make sure which one is loaded, because it may not be the right version.
If the files are there, there's only one version of them, they're in the PATH and it still cannot find them, you can try registering the files manually by running the regsvr32
command on the required DLL.
Upvotes: 1