.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DBD::Oracle::Troubleshooting::Win64 3pm" .TH DBD::Oracle::Troubleshooting::Win64 3pm "2019-01-06" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" DBD::Oracle::Troubleshooting::Win64 \- Tips and Hints to Troubleshoot DBD::Oracle on Win64 .SH "VERSION" .IX Header "VERSION" version 1.76 .SH "DBD::Oracle and Windows 64bit" .IX Header "DBD::Oracle and Windows 64bit" I have successfully compiled and installed DBD::Oracle on Windows 2008 server 64bit operating system today. .PP I used the latest version of DBD::Oracle 1.24 version 11.2.0.1.0 for 64bit windows of Oracle's Instant Client Package \- Basic along with the Instant Client Package \- SQL*Plus and finally the Instant Client Package \- \s-1SDK.\s0 .PP To get it to Make and compile correctly I had to download Microsoft's Visual Studio Ultimate .PP which should contain all the files you need. It is rather portly at 2+gb so you might want to grab lunch while you are downloading it. .PP After all the above downloading DBB::Oracle installed right out of the box. .PP All one has to do is select 'Start Menu\->All Programs\->Microsoft Visual Studio 2010\->Visual Studio Tools\->Visual Studio x64 Win64 Command Prompt (2010)' which will open a good old 'dos' window. .PP At this point \s-1CD\s0 to the directory where you downloaded DBD::Oracle .PP c:\eDBD\-Oracle> .PP then set your '\s-1ORACLE_HOME\s0 to the Instant Client directory .PP c:\eDBD\-Oracle>set ORACLE_HOME=c:\eIC_11 .PP you should also set your \s-1NLS\s0 like this .PP c:\eDBD\-Oracle>set NLS_LANG=.WE8ISO8859P15 .PP Once the above setting are done do a .PP c:\eDBD\-Oracle>perl Makefile.PL .PP and then a .PP c:\eDBD\-Oracle>nmake install .PP Which will produce a whole of warnings (the make you can ignore them for now as they do not seem to effect DBD::Oracle at all) and near the end it should output something like this; .PP Generating code Finished generating code if exist blib\earch\eauto\eDBD\eOracle\eOracle.dll.manifest mt \-nologo \-manifest blib\earch\eauto\eDBD\eOracle\eOracle.dll.manifest \-outputresource:blib\earch\eauto \&\eDBD\eOracle\eOracle.dll;2 if exist blib\earch\eauto\eDBD\eOracle\eOracle.dll.manifest del blib\earch\eauto\eDBD\eOracle\eOracle.dll.manifest C:\ePerl64\ebin\eperl.exe \-MExtUtils::Command \-e \*(L"chmod\*(R" \*(-- 755 blib\earch\eauto\eDBD\eOracle\eOracle.dll C:\ePerl64\ebin\eperl.exe \-MExtUtils::Command \-e \*(L"cp\*(R" \*(-- Oracle.bs blib\earch\eauto\eDBD\eOracle\eOracle.bs C:\ePerl64\ebin\eperl.exe \-MExtUtils::Command \-e \*(L"chmod\*(R" \*(-- 644 blib\earch\eauto\eDBD\eOracle\eOracle.bs C:\ePerl64\ebin\eperl.exe \*(L"\-Iblib\earch\*(R" \*(L"\-Iblib\elib\*(R" ora_explain.PL ora_explain Extracted ora_explain from ora_explain.PL with variable substitutions. C:\ePerl64\ebin\eperl.exe \-MExtUtils::Command \-e \*(L"cp\*(R" \*(-- ora_explain blib\escript\eora_explain pl2bat.bat blib\escript\eora_explain .PP At this point you are all done. .PP Well almost .PP It is important that you test your code before you install but you will have to set a few things up to get it to fully test correctly .PP You will need a \s-1TNSNAMES.ORA\s0 file that points to a valid \s-1DB\s0 in the Instant Client Directory .PP Next you will need to set the \s-1ORACLE_USER_ID\s0 to a valid user .PP c:\eDBD\-Oracle>set ORACLE_USER_ID=system/system@XE .PP You will have to set up \s-1TNS_ADMIN\s0 to point to the Instant Client Directory .PP c:\eDBD\-Oracle>set TNS_ADMIN=c:\eIC_11 .PP Most importantly you will have to add the Instant Client directory to your path like this .PP c:\eDBD\-Oracle>path = c:\eIC_11;%path% .PP If you do not do this step you will run into the dreaded .PP Can't load 'C:/Perl/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:%1 is not a valid Win32 application at C:/Perl/lib/DynaLoader.pm line 202. .PP Error later on after the compile when you try to use DBD::Oracle. .PP What is actually going on is that Perl cannot find oci.dll (or one of the other .dlls it needs to run) the 'C:/Perl/lib/auto/DBD/Oracle/Oracle.dll' and the DynaLoader error are just a false trails. For more info on this check out this page Oracle Troubleshooter' by Alexander Foken. It is rather dated but the facts of why perl did not find a dll are still valid. .PP now you can do this .PP c:\eDBD\-Oracle>nmake test .PP and all the tests should run and it will report .PP Finally simple do a .PP c:\eDBD\-Oracle>nmake install .PP and you are all set .PP That is about it. .PP At this point you might want to add the Instant Client directory permanently to your path so you will not run into the Dynaloader error again. .PP In general compiling DBD:Oracle for 64 bit machines has been a hit or miss operation. The main thing to remember is you will have to compile using 32 bit Perl and compile DBD::Oracle against a 32bit client which sort of defeats the purpose of having a 64bit box. So until 64bit Perl comes out we will be posing in this \s-1README\s0 any success stories we have come across .PP \&\-\-\-\-\-\-\-\- Original Message \-\-\-\-\-\-\-\- From: Alex Buttery, \s-1OCA, MCTS\s0 Director, Database Architecture and Operations Impact Rx, Inc. .PP I needed to get perl working on a 64\-bit Windows Server so I got creative. Since I was unable to build DBD::Oracle on the Windows Server (even with Visual Studio 6 installed), I decided that I would try another approach. Here are the steps I took to get it working (yes, this is a hack and I'm not even sure that it does not violate someone's license agreements but I'm not going to be asking anyone else to support this configuration). .PP .Vb 1 \& Step 1: Install 32\-bit Perl 5.8.8 from Activestate on the Server to the C: drive. \& \& Step 2: Install the 32\-bit Oracle client on the server (I\*(Aqm assuming the 64\-bit client has already been installed and is working) to \& the c:\eoracle\eproduct\e10.2.0\eclient32 directory in the OraHome_Client32 Home. \& \& Step 3: Locate Oracle.dll in the new Oracle Home directory, it should be located somewhere close to \& c:\eoracle\eproduct\e10.2.0\eclient32\eperl\esite\e5.8.3\eMSWin32\-x86\-multi\-thread\eauto\eDBD\eOracle. \& \& Step 4: Locate Oracle.dll in the Perl 5.8.8 directory. (C:\ePerl) It should be somewhere close to c:\ePerl\esite\elib\eauto\eDBD\eOracle. \& \& Step 5: Copy the contents of the Oracle directory found in Step 3 to the Perl directory found in Step 4. \& \& Step 6: Copy GetInfo.pm from C:\eoracle\eproduct\e10.2.0\eclient32\eperl\esite\e5.8.3\elib\eMSWin32\-x86\-multi\-thread\eDBD\eOracle to C:\ePerl\esite\elib\eDBD\eOracle \& \& Step 7: Locate Oracle.pm in the new Oracle Home directory, it should be located somewhere close to \& c:\eoracle\eproduct\e10.2.0\eclient32\eperl\esite\e5.8.3\eMSWin32\-x86\-multi\-thread\eauto\eDBD. \& \& Step 8: Locate Oracle.pm in the Perl 5.8.8 directory. (C:\ePerl) It should be somewhere close to c:\ePerl\esite\elib\eauto\eDBD. \& \& Step 9: Copy Oracle.pm from the Oracle directory found in Step 7 to the Perl directory found in Step 8. \& \& Step 10: Set up required ODBC connections using the 32\-bit ODBC applet (odbcad32.exe) located in the C:\eWindows\eSysWOW64 directory. \& Note: The ODBC applet in the Administrative Tools menu points to the odbcad32.exe located in the C:\eWindows\esystem32 directory \& and is actually the 64 bit version of the ODBC applet This cannot be used by Perl \& \& Step 11: Create batch scripts to run Perl programs and include the following SET statements to point Perl to the correct Oracle Home: \& \& SET ORACLE_HOME=c:\eoracle\eproduct\e10.2.0\eclient32 <== 32\-bit Oracle Home \& \& SET ORACLE_SID=xyz123 <== SID of Production Database \& \& SET NLS_LANG=.WE8ISO8859P1 <== Default Language from Database (preceding "." Is required) \& \& SET PATH=%ORACLE_HOME%\ebin;%PATH% <== Add 32\-bit Oracle Home to beginning of default PATH .Ve .SH "AUTHORS" .IX Header "AUTHORS" .IP "\(bu" 4 Tim Bunce .IP "\(bu" 4 John Scoles .IP "\(bu" 4 Yanick Champoux .IP "\(bu" 4 Martin J. Evans .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2018, 2014, 2013, 2012, 2011, 2010 by Tim Bunce. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.