By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,002 Members | 2,157 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,002 IT Pros & Developers. It's quick & easy.

Connecting with Perl to Oracle

P: 1
I’m trying to connect with perl DBD::Oracle on Windows to Oracle DB (Linux).

I compiled the Oracle.dll using the commands “perl Makefile.pl” “nmake” and “nmake install”, but when I try to connect to the DB, I get the following runtime error:

“R6034 an application has made an attempt to load the C Runtime library incorrectly.
Please contact the applications’ support team for more information.”

I suspect that I mixed the versions of VC compiler/Linker, when creating the Oracle.dll.

Here are the important env variables:
Expand|Select|Wrap|Line Numbers
  1. INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE;;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
  2. LIB=C:\Program Files\Microsoft Visual Studio 8\VC\LIB;C:\Program Files\Microsoft
  3.  Visual Studio 8\SDK\v2.0\lib;;C:\Program Files\Microsoft Visual Studio 8\VC\LIB;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib
  4. LIBPATH=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
  5. Path=C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files\Microsoft Visual Studio 8\VC\BIN;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 8\VC\VCPackages;C:\Perl\bin\;C:\Perl\bin\;C:\Perl\site\bin;C:\Perl\bin;c:\Perl_ActiveState\site\bin;c:\Perl_ActiveState\bin;D:\oracle\product\10.2.0\client_1\bin;C:\Oracle9i\bin;C:\Orant\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\TELSTRA\Utils;c:\Program Files\Rational\common;C:\Program Files\IBM\Installation Manager\eclipse\lib;C:\Program Files\OpenVPN\bin
here is my code:

Expand|Select|Wrap|Line Numbers
  1. use DBI qw(:sql_types);
  2.  use DBD::Oracle;
  3.  
  4.  my $DB_Username     = "xxxx";
  5.  my $DB_Password     = "xxxxx";
  6.  my $DB_Type         = "";
  7.  my $DB_Handle       = "";
  8.  my $DB_Host         = "1.2.3.4";
  9.  my $DB_Sid          = "DBSID";
  10.  my $DB_DSN          = "DBI:Oracle:RAMDB";
  11.  
  12.   my $dbh = DBI->connect($DB_DSN, $DB_Username, $DB_Password) || die ("can't connect to DB \n");
  13.  
Does anyone has a suggestion as to how to debug it , or fix it ?
Feb 27 '08 #1
Share this Question
Share on Google+
1 Reply


eWish
Expert 100+
P: 971
If you are on a windows machine and using ActiveState, you can use the PPM utility to install the DBD::Oracle module for you. Try that and see if it corrects your problems.


Also, please use Code tags when posting code here. Thank You.

--Kevin
Feb 27 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.