++ed by:

11 PAUSE user(s)
5 non-PAUSE user(s).

Pythian Remote DBA
and 4 contributors


DBD::Oracle::Troubleshooting::Linux - Tips and Hints to Troubleshoot DBD::Oracle on Linux


version 1.48

Installing with Instantclient .rpm files.

Nothing special with this you just have to set up you permissions as follows;

1) Have permission for RWE on '/usr/lib/oracle/' or the other directory where you RPMed to

2) Set export ORACLE_HOME=/usr/lib/oracle/


4) If you plan to use tnsnames to connect to remote servers and your tnsnames.ora file is not in $ORACLE_HOME/network/admin, you will need to Export TNS_ADMIN=dir to point DBD::Oracle to where your tnsnames.ora file is

undefined symbol: __cmpdi2 comes up when Oracle isn't properly linked to the libgcc.a library.

In version 8, this was correctd by changing the SYSLIBS entry in $ORACLE_HOME/bin/genclntsh to include "-L/usr/lib/gcc-lib/i386-redhat-linux/3.2 -lgcc".

I had tried this with no success as when this program was then run, the error "unable to find libgcc" was generated. Of course, this was the library I was trying to describe!

It turns out that now it is necessary to edit the same file and append "`gcc -print-libgcc-file-name`" (including the backquotes!). If you do this and then run "genclntsh", the libclntsh is properly generated and the linkage with DBD::Oracle proceeds properly.

cc1: invalid option `tune=pentium4'" error

If you get the above it seems that eiter your Perl or OS where compiled with a different version of GCC or the GCC that is on your system is very old.

No real problem with the above however you will have to

1) run Perl Makefile.PL

2) edit the Makefile and remove the offending '-mtune=pentium4' text

3) save and exit

4) do the make install and it should work fine for you

Oracle 9i Lite

The advice is to use the regular Oracle9i not the lite version.

Another great source of help was: http://www.puschitz.com/InstallingOracle9i.html

just getting 9i and 9i lite installed. I use fvwm2(nvidia X driver) as a window manager which does not work with the 9i install program, works fine with the default Gnomish(nv X driver), it could have been the X driver too.

With Redhat9 it is REAL important to set LD_ASSUME_KERNEL to 2.4.1.

I didn't try this but it may be possible to install what is needed by only downloading the first disk saving some 1.3GB of download fun.

I installed a custom install from the client group. The packages I installed are the Programmers section and sqlplus. I noticed that the Pro*C when on as a result of the checking the Programmers section I assume.

Once Oracle was installed properly the DBD::Oracle install went as smooth as just about every other CPAN module.

Oracle 10g Instantclient

The Makefile.PL will now work for Oracle 10g Instantclient. To have both the Compile and the test.pl to work you must first have the LD_LIBRARY_PATH correctly set to your "instantclient" directory. (http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html)

The present version of the make creates a link on your "instantclient" directory as follows "ln -s libclntsh.so.10.1 libclntsh.so". It is needed for both the makefile creation and the compile but is not need for the test.pl. It should be removed after the compile.

If the Makefile.PL or make fails try creating this link directly in your "instantclient" directory.

Oracle Database 10g Express Edition 10.2

To get 10Xe to compile correctly I had to add $ORACLE_HOME/lib to the LD_LIBRARY_PATH as you would for an install against 10g Standard Edition, Standard Edition One, or Enterprise Edition

UTF8 bug in Oracle and

DBD::Oracle seems to hit some sort of bug with the above two versions of DB. The bug seems to hit when you when the Oracle database charset: US7ASCII and the Oracle nchar charset: AL16UTF16 and it has also been reported when the Oracle database charset: WE8ISO8850P1 Oracle nchar charset: AL32UTF16.

So far there is no patch for this but here are some work arounds

    $sth->bind_param(1, $value, { ora_csform => SQLCS_NCHAR });

    or this way

    $dbh->{ora_ph_csform} = SQLCS_NCHAR; # default for all future placeholders

    or this way

    utf8::downgrade($parameter, 1);


  • Tim Bunce <timb@cpan.org>

  • John Scoles

  • Yanick Champoux <yanick@cpan.org>

  • Martin J. Evans <mjevans@cpan.org>


This software is copyright (c) 1994 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.