NAME
DBD::Oracle::Troubleshooting::Aix - Tips and Hints to Troubleshoot DBD::Oracle on AIX
VERSION
version 1.83
Using Visual Age 7 C Compiler
Oracle 9i is only certified as a 64-bit application on AIX 5L (5.1,5.2,5.3) with 32-bit support; in other words, there is no 9i "32-bit" Oracle client
Oracle 10g is certified as both a 64-bit application and a 32-bit Oracle client
This information only pertains to deploying:
the DBI (version 1.48)and DBD-Oracle (version 1.16):on AIX 5.3using Oracle 9i (9.2.0.1/9.2.0.5)using the existing Perl 5.8.2 (no custom-built Perl) which is 32-bitusing Visual Age 7.0 C/C++ compiler
Install the DBI (required for the DBD-Oracle install - no issues here) Untar the DBD-Oracle bundle Run Makefile.PL
$ perl Makefile.PL
Edit Makefile with following commands:
1,$s?/lib/ ?/lib32/ ?g1,$s?-q64??g1,$s?/lib/sysliblist?/lib32/sysliblist?g
Now perform normal commands to perform the testing/making:
$ make$ make test$ make install
I've tested the basics of the DBD-Oracle and it seems fully functional.
Stephen de Vries
Using gcc C Compiler
DBD::Oracle with gcc and Oracle Instant Client on AIX--------------------------------------------------------------------------------------Nathan Vonnahme Dec 15 2005, 4:28 pm Newsgroups: perl.dbi.usersSee: http://groups.google.com/group/perl.dbi.users/msg/0bd9097f80f2c8a9[ with updates 1/31/2006 - DBD::Oracle 1.17 doesn't need makefile hackingto work with instantclient on AIX ]Yes! It eluded me last year but I finally got DBD::Oracle working on anAIX machine using gcc. Here's the short version:First I had to recompile perl with gcc, usingsh Configure -de -Dcc=gccThis apparently built a 32 bit perl, someday I will try getting it to go64 bit.I was then able to install and build DBI 1.50 with the CPAN shell.I downloaded the base and sdk packages of the Oracle Instant Client forAIX -- first I tried the 64 bit but that didn't work with my 32 bit perl-- the 32 bit version (still at 10.1.0.3) did the trick. I unzippedthem and moved the dir to /usr/local/oracle/instantclient10_1 and made asymlink without the version at /usr/local/oracle/instantclient , thenset:export ORACLE_HOME=/usr/local/oracle/instantclientexport LIBPATH=$ORACLE_HOMEOracle wasn't providing the sqlplus package for 32 bit AIX so Iexplicitly told Makefile.PL the version:perl Makefile.PL -V 10.1makeMy test databases were on other machines so I set these environment variablesto get the tests to run:export ORACLE_DSN=DBI:Oracle://host/dbinstanceexport ORACLE_USERID="user/password"make testmake installNOTE: I have an older full version of Oracle on this machine, and theORACLE_HOME environment variable is normally set to point to that, somy perl scripts that use DBD::Oracle have to make sure to first set$ENV{ORACLE_HOME}='/usr/local/oracle/instantclient';--------------------------------------------------------------------------------------The following setup worked to build on AIX 5.2:gcc-3.3.2 (32-bit) (configure opts [ --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as])Oracle-9.2.0 ( full install w/32bit support)perl-5.8.3 (built with above gcc/latest stable as of March 2004)Followed the directions from Rafael's email below, only set ORACLE_HOME, (andthe appropriate test environmentals).1) build perl-5.8.3 with gcc2) install DBI3) ORACLE_HOME="your oracle home"ORACLE_USERID..ORACLE_SID ..(I ignored ORACCENV, didn't use it.)4) install DBD::Oracle, after perl Makefile.PL, edit the created Makefile,changing references to Oracle's ../lib to ../lib32. and change crt0_64.o tocrt0_r.o. Remove the -q32 and/or -q64 options from the list of libraries tolink with.5) make should be clean, make test should pass.This setup worked with 8.1.7 w/32 bit support, and with 9.2.0 w/ 32-bit support.--Adrian Terranova
Using xlc_r C Compiler
From: Rafael CaceresDate: 22 Jul 2003 10:05:20 -0500The following sequence worked for me on AIX 5.1:-use Perl 5.8.0 (the latest stable from CPAN)-use the xlc_r version of IBM's compiler and build a 32 bit Perl(which xlc_r will do by default). All tests should be successful.-get and install DBI-get DBD::Oracle. Edit the Makefile.PL or Makefile for DBD::Oracle,changing references to Oracle's ../lib to ../lib32. and change crt0_64.oto crt0_r.o. Remove the -q32 and/or -q64 options from the list oflibraries to link with. Do the make and make test.-Set up the environment for making DBD::Oracle:ORACLE_HOME="your oracle home"ORACCENV = "xlc_r"ORACLE_USERID..ORACLE_SID ..-Run make, all tests should be successful -against Oracle 9.x at least.You should have no problems with Oracle 8.1.7, but accessing Oracle 7.xor previous is not possible (you'll core dump, or simply hang). The samegoes for a Linux build or a Digital build, regarding access of differentOracle versions.Rafael Caceres> I don't believe I compiled Oracle. During the installation it was linked> but I am not sure it was compiled>> I used a xlc compiler to compile PERL.> Got this message in the Perl Makefile.PL output>> Warning: You will may need to rebuild perl using the xlc_r compiler.> You may also need do: ORACCENV='cc=xlc_r'; export ORACCENV> Also see the README about the -p option>> this probably means I need to rebuild PERL with xlc_r??>> thanx>> Mike Paladino> Database AdministratorFrom: Rafael Caceres>> Make sure you use the same compiler to build Oracle and Perl. We have> used xlc_r on Aix 5.1 with no problems. Your Perl build is 32 bit, so> when building DBD::Oracle, you should use the 32bit libraries (change> references to .../oracle/lib to .../oracle/lib32 in your Makefile).> Remove the references to the -q64 or -q32 parameters for ld in Makefile,> as they shouldn't be there.>> Rafael CaceresFrom: "cartman ltd"Subject: Tip for DBI and DBD::Oracle on AIX 5.1 and Oracle 9.2Date: Mon, 11 Aug 2003 18:15:38 +0000Message-ID: <[email protected]>Here is a tip for compiling DBD::Oracle as a 32 bit application on AIX 5.164 bit and Oracle 9.2 64 bit without editing any makefiles. I hope peoplefind this useful:First, the versions of products I used:DBI version 1.32DBD::Oracle version 1.14Oracle 9.2.0.2 - default 64 bit application with 32 bit librariesAIX 5.1 ML03 - 64 bit kernel - ships with Perl as a 32 bit application.VisualAge C/C++ 5.0.2Basically DBD must be compiled as 32 bit to link with Perl's 32 bitlibraries.gunzip -c DBD-Oracle-1.14.tar.gz | tar xvfcd DBD-Oracle-1.14perl Makefile.PL -m $ORACLE_HOME/rdbms/demo/demo_rdbms32.mkmakeNB: I think there is a bug in the Oracle 9.2.0.3 file$ORACLE_HOME/rdbms/lib/env_rdbms.mkI corrected this (before running the above commands) by replacing theinvalid linker optionLDFLAGS32=-q32withLDFLAGS32=-b32Have fun: KC.--------------------------------------------------------------------------------------Date: Wed, 30 Jun 2004 23:34:24 -0500From: "SCHULTZ, DARYLE (SBCSI)"Got it to work. Using dbd 1.16Perl 5.8.4 built like this, with Visual Age 6.0:config_args='-Dcc=xlc_r -Dusenm -Dprefix=/appl/datasync/work/perl5-Dusethreads -Duse64bitall -des'==============================================Used DBI 1.42=============================================Added this to top of Oracle.h:#define A_OSF#include <oratypes.h>=======================Set LIBPATH to point to 64bit Oracle libs first.export LIBPATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:/usr/libUse: perl Makefile.PL -nobChange all references in Makefile of LD_RUN_PATH to be LIBPATH.Change nothing else, left all flags in Makefile, including -q64.Passed make, and all tests.--------------------------------------------------------------------------------------
AUTHORS
- •
-
Tim Bunce <[email protected]>
- •
-
John Scoles <[email protected]>
- •
-
Yanick Champoux <[email protected]>
- •
-
Martin J. Evans <[email protected]>
COPYRIGHT AND LICENSE
This software is copyright (c) 2022, 2021, 2019, 2014, 2013, 2012, 2011, 2010 by Tim Bunce.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.