After successfully installing the DBD-DB2.ppd file, I run a script to list the drivers and I get an error. It cannot find the DB2CLI.dll file and it's searching in the C:\Perl\site\lib\auto\DBD\DB2 directory. Any ideas where to get this file and why it does not exist?
The DOS window errors include:
install_driver(DB2) failed: Can't load 'C:/Perl/site/lib/auto/DBD/DB2/DB2.dll' for module DBD:
B2: load_file: The specified module could not be found at C:/Perl/lib/Dynaloader.pm line 206.
at (eval 2) line 3.
Compilation failed in require at (eval 2) line 3.
Perhaps a required shared library or dll isn't installed where expected
at list_drivers.pl line 15
The script I run (list_drivers.pl) is:
#!/usr/bin/perl -w
#
# ch04/listdsns: Enumerates all data sources and all installed drivers
#
use DBI;
### Probe DBI for the installed drivers
my @drivers = DBI->available_drivers();
die "No drivers found!\n" unless @drivers; # should never happen
### Iterate through the drivers and list the data sources for each one
foreach my $driver ( @drivers ) {
print "Driver: $driver\n";
my @dataSources = DBI->data_sources( $driver );
foreach my $dataSource ( @dataSources ) {
print "\tData Source is $dataSource\n";
}
print "\n";
}
exit;
The DOS window errors include:
install_driver(DB2) failed: Can't load 'C:/Perl/site/lib/auto/DBD/DB2/DB2.dll' for module DBD:
at (eval 2) line 3.
Compilation failed in require at (eval 2) line 3.
Perhaps a required shared library or dll isn't installed where expected
at list_drivers.pl line 15
The script I run (list_drivers.pl) is:
#!/usr/bin/perl -w
#
# ch04/listdsns: Enumerates all data sources and all installed drivers
#
use DBI;
### Probe DBI for the installed drivers
my @drivers = DBI->available_drivers();
die "No drivers found!\n" unless @drivers; # should never happen
### Iterate through the drivers and list the data sources for each one
foreach my $driver ( @drivers ) {
print "Driver: $driver\n";
my @dataSources = DBI->data_sources( $driver );
foreach my $dataSource ( @dataSources ) {
print "\tData Source is $dataSource\n";
}
print "\n";
}
exit;