New oracle instance.  New perl DBI install on windows. 

Error:
--------------------

install_driver(Oracle) failed: Can't load 
'C:\Perl\site\5.005\lib/MSWin32-x86-object/auto/ 
DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:A dynamic link library (DLL) 
init 
ialization routine failed at C:\Perl\5.005\lib/MSWin32-x86-object/DynaLoader.pm 
line 168. at (eval 1) line 2 

DBI::install_driver('DBI', 'Oracle') called at C:\Perl\site\5.005\lib/DBI.pm line 348 
DBI::connect('DBI', 'DBI:Oracle:ora3.dnax.org', 'scott', 'tiger', 'HASH(0x821578)' ) 
called at scipt3.pl line 8

---------------------

Can't tell which is misconfigured.  Perl DBI 
or Oracle instance!   How do I validate perl install by calling another networked 
oracle instance from this  perl installation to see if it connects to another 
instance?  Anyone have pointer to steps & binaries which flawlessly installs perl dbi 
on windows.   I'm using the orielly CD from the win32 lizard book which has worked 
fine on other systems (but is 2 yrs old).  The script ( below) works fine on other 
oracle/perl/DBi windows installations.
------------------------------------
#
use DBI;
print $ENV{ORACLE_SID};
print "\n";
print "\n";
        my $dbh = DBI->connect('DBI:Oracle:ora3.dnax','scott','tiger',\%attr)
                or die "Couldn't connect to database: " . DBI->errstr;
        my $sth = $dbh->prepare('select * from emp where ename = ?')
                or die "Couldn't prepare statement: " . $dbh->errstr;
        print "If name present, will print HIREDATE and ENAME\n";
print "\n";
        print "Enters row tuple for ename here    > ";
        while ($ename = <>) {   # Read input from Beth
          my @data;
          chomp $ename;
print "1\n";
          $sth->execute($ename)   # Execute the query
            or die "Couldn't execute statement: " . $sth->errstr;
          # Read matching records and print 'em out
          while (@data = $sth->fetchrow_array()) {
            my $lasttname = $data[1];
            my $id = $data[4];
print "2\n";
            print "\t$id: $ename $lastname \n";
          }
          if ($sth->rows == 0) {
print "3\n";
            print "No names matched `$ename'.\n\n";
          }
          $sth->finish;
          print "\n";
          print "Enter name> ";
        }
        $dbh->disconnect;

Reply via email to