Perl DBI and DBD::Oracle

Has anyone had any exerience with using Perl, DBI and DBD::Oracle to access Oracle databases on NT? I'll be starting a project that requires this kind of configuration and I was wondering if anyone has pointers.
TIA!

try cpan.org

Similar Messages

  • Get sql*net to use perl module (DBI and DBD::Oracle)

    Hi,
    I'm doing a perl script which tests oracle database availability
    Now to install it on a Unix computer i need some Oracle files to use the DBI and DBD::Oracle module
    I saw in differents forums that i need to install SQL*NET to have those files but i know few things about Oracle products and then i don't know which package i have to download to have it.
    If someone have the answer please mail me !!([email protected])
    Thanks a lot
    Nicolas Minant

    Ok, so i got it working as below. putting the details steps for someone to refer (or may myself in future if i forget)
    - Install Perl DBI module
    - install below 3 rpm for oracle instant client from (http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html)
    oracle-instantclient11.2-basic-11.2.0.3.0-1
    oracle-instantclient11.2-devel-11.2.0.3.0-1
    oracle-instantclient11.2-sqlplus-11.2.0.3.0-1
    I am using 64 bit linux box, so choose your RPM accordingly.
    - set below variables:
    LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib
    ORACLE_HOME=/usr/lib/oracle/11.2/client64
    also add ORACLE_HOME to your PATH variable
    - download DBD::Oracle ver 1.44 from
    - untar the module and run below commands in given sequence:
    perl Makefile.PL
    make
    make install
    DONE !!!
    Issues I had faced were due to the wrong LD_LIBRARY_PATH. i had set it to "/usr/lib/oracle/11.2/client64" whereas the correct value is "/usr/lib/oracle/11.2/client64/lib"
    certainly, this was a great learning for a newbie like me. i have spent 8 years as Linux sysadmin and have done a lot of perlscripting bt never had to deal with oracle stuff ever. hence this was a learning for me.
    Thanks everyone for your responses. you guys pushed me to right direction. thanks for the Great HELP.

  • Perl DBI and DBD

    I know there has been a thread for this but there does not to be an answer to this.
    I have a new mac mini with Snow Leopard which I installed MYSQL 5 64 bit. I am trying to run perl scripts that connect to MYSQL but Perl throws an error regarding the DBD module. I have tried using CPAN to update the modules which seems to be successfull in regards updating but still I get the DBD module error. I have tried installing the modules manually but still I get the same error. Also I tried 32 bit MySQL but still it does not work.
    Has anyone solved this problem at all? I have rolled back my Mac using timemachine to the stock build so I am ready to try this all again!
    Regards
    Chris.
    Message was edited by: BigChrisUK01

    BigChrisUK01 wrote:
    to be honest I am not totally sure what I am doing.
    Unfortunately, you are going to have to find out. You are trying to get 4 very complex systems (MacOS X, MySQL, Perl, and CPAN) all working together. Plus, you have chosen to do so on a brand-new OS.
    If you want people to be able to help you can't just say things like "an error", "does not work", or "a web site". You must be explicit. What error are you getting? Use copy and paste. If you try it a different way, what error is that? What web site were you looking at? Maybe it was from 2002.
    Your first step is to find out just what is installed on your system. Use the command "file" to find out what architecture your mysqlclient libraries are. Also find out about your DBD files.

  • Installing DBI and DBD::mysql in 10.4 Tiger, with MySQL 5.0

    After some discussion here http://discussions.apple.com/thread.jspa?threadID=546982&tstart=0
    I wanted to document what was required to get Bundle::DBI and DBD::mysql installed.
    I started off with the helpful info found on the following two pages, but I had to do more to get it working:
    http://www.truerwords.net/articles/osx/installdbdmysql.html
    http://www.gyford.com/phil/writing/2004/06/07/installingdbia.php
    Note: I am working with mysql-standard-5.0.15-osx10.4-powerpc,
    downloaded and configured according to the MySQL site instructions.
    If you are using an earlier version of MySQL, then you will need to adjust accordingly. The articles I link to above, may work for you verbatim.
    1. Download DBI 1.51 from CPAN:
    http://search.cpan.org/~hoymich/DBI-1.45-5.8.4/
    2. Unpack the file, eg: tar -xzvf DBI-1.51.tar.gz
    3. cd into the directory
    4. Type perl Makefile.PL
    5. Type make && make test
    6. sudo make install (NB: See below !)
    7. IMPORTANT: to get DBD to install, you may need to specify the location of your mysql_config file:
    perl Makefile.PL --testdb=test --testuser=nameused --testpassword=actualpasswdused --testhost=localhost --mysqlconfig=/usr/local/mysql/bin/mysqlconfig
    If something goes wrong, backup by typing:
    make clean
    Another note: I granted full priveleges for the "test" user on the "test" database, which is accepting local connections only and will be removed after everything is configured.
    # now for DBD
    8. Download DBD::mysql from CPAN http://search.cpan.org/~capttofu/DBD-mysql-3.0006
    9. unpack the archive & cd into it
    10. perl Makefile.PL --testdb=test --testuser=nameused --testpassword=actualpwdused --testhost=localhost
    11. make && make test
    12. sudo make install
    That's what it took, hopefully this will help others who need it, and not offend those who know more about it

    Hi David!
    I'm trying to help my incredibly frustrated boyfriend, who's trying to upgrade to Tiger on his 12" PB (1.3 MHz single processor).
    He does a lot of web design and development, so he formatted his drive as HFS+, case-sensitive, journaled, and has installed his Adobe apps on a dmg, which works great.
    BUT (and he says this is always a problem) installing DBD::mySQL is proving near-impossible! His install is failing 98% of the tests run during maketest. He thinks the problem may actually be occurring when he runs Makefile. Here's the error message he's getting, even after reading your posts:
    During Makefile.PL:
    Can't exec "mysql_config": No such file or directory at Makefile.PL line 450.
    Do you have any idea of a direction to point him in? He's so frustrated he can't even post to the forum - language not suitable for family viewing at this time.
    Thanks!
    Natalie
    Dual 867MHz G4 MDD   Mac OS X (10.3.6)  

  • Can't install Perl DBI or DBD::mysql after Mountain Lion upgrade

    I recently upgraded to Mountain Lion and found that my Perl DBI scripts stopped working, with the error message "Can't locate DBD/mysql.pm in @INC".
    The last time this happened, after upgrading to Lion, the solution was to install the new version of Xcode. Then I was able to use the Perl CPAN module to install DBI and DBD::mysql. (MySQL is already installed and running with no problem on the Mountain Lion machine.)
    Now I have installed Xcode 4.5.1, and tried
    mrb% sudo perl -MCPAN -e shell
    [then CPAN configures itself]
    cpan[1]> install DBI
    and it fails with this final message:
    /System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/perl.h:583:11: fatal error:
          'sys/types.h' file not found
    #       include <sys/types.h>
                    ^
    1 error generated.
    make: *** [Perl.o] Error 1
      TIMB/DBI-1.622.tar.gz
      /Developer/usr/bin/make -- NOT OK
    'YAML' not installed, will not store persistent state
    Running make test
      Can't test without successful make
    Running make install
      Make had returned bad status, install seems impossible
    Failed during this command:
    TIMB/DBI-1.622.tar.gz                        : make NO
    Can anybody help?

    Here is a link to a resolution in Lion. It may also solve your Mountain Lion Perl DBD issue as well.
    If you run the command below before executing your Perl script the library is found and all is well!
    export DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"
    Put this in your .bashrc or .bash_profile.
    On Apple StackExchange, Matthew Weiss had another approach.
    I found on another website the following command
    $ sudo perl -MCPAN -e 'CPAN::Shell->notest(install => CPAN::Shell->r)'
    This updated all my perl modules and all is back to normal. Not sure why or what, but don't care that it is working now.

  • Perl DBI and ODBC Access to Oracle

    I am trying to communicate with an Oracle database from a Debian Linux system.
    I have looked through much documentation of various vintages, on how to achieve this, but I am still unclear about what I need.
    I have the iODBC stuff, but this seems to need a "driver". Most references to drivers seem to need something from the Oracle distribution - typically header files or "oracle.mk"
    Can anyone point me to an open source or downloadable driver, or help me to identify a way of downloading the necessary bits of Oracle to permit a driver to be built.
    Thanks, (in hope),
    Dave Whiteley

    Re the reply below,
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by gv ():
    you need two things:
    the DBI package (interface)
    the DBD package (driver)
    you can find both on CPAN
    <HR></BLOCKQUOTE>
    Things are not as simple as indicated. To install the DBD package you MUST have an environmental variable ORACLE_HOME set up and pointing at an Oracle installation. It reads some of the files there in order to install itself.
    This means that to install DBD:Oracle you need to first install Oracle... Unless, someone knows which files are necessary for the install, and they are legally availablke without breaking the Oracle license.
    I have sucessfully installed DBD:Oracle in this way (at least, I can communicate with a remote server).
    There are similar issues with DBD:ODBC.
    This installs easily, however, as I understand the situation, it needs to communicate with other local "driver" software in order to contact the remote server. I I have not yet sucessfully installed and used this "driver" software. Again this seems to require a lcal Oracle installation.
    The driver software consists of a driver manager, and the driver itself. Different people distribute different versions of these and the documentation available has confused me - perhaps some of it is out of date?
    Up to now I am working on a lightly loaded machine with space. I will need to set up the working system on another more heavily loaded machine. I do not want to have to Install Oracle on that. I will never use it. It will only be there to permit installation of the Perl DBD stuff.
    Hints and advice welcome.
    Dave

  • Oas install.sh MIA??? and DBD::Oracle

    I've downloaded all 181MB of the WAS, and when I untared it into
    the $ORACLE_HOME directory, the install.sh script mentioned in
    the README wasn't there....
    Curious.
    Anyone else had this experience?
    BTW, my DBD::Oracle install keeps blowing up during make test
    step? What's wierd is I had DBD/DBI all workgin beautifully last
    week, but an ill-timed SCSI failure and inadequate backups sent
    me past Go without collecting $200....
    Oh, I'm running RH5.1 with the new, much discussed glibc
    installed. The DB is up and running...
    So in summary:
    Where's the OAS installer...
    What's up with DBD::Oracle....
    TIA
    Matt
    null

    Instant Client works (and works well) with DBD::Oracle on Linux. The only
    issue I've noticed is one that seems to always be present in DBD::Oracle
    (can't insert/update a CLOB via a synonym, need to use the full name).
    Instant Client with DBD::Oracle on Solaris can be made to work but it is very,
    very dodgy. You have to force it to link with some C++ libaries which the
    Oracle libraries reference symbols in (why they do that I don't know).
    But perl isn't a C++ application. It will often segfault or hang on program
    termination (among other issues). If you want to find the libraries you can
    grep for the required symbols through /usr/lib and you should find them.
    If you're using DBD::Oracle on Solaris, use a proper Oracle client install.

  • MaxDB perl DBI and sql error -4008

    I'm using PERL DBI module to connect to my liveCache instances, as a read-only user, to obtain status of various things.
    I've installed the latest MaxDB DBI modules and latest MaxDB 7.7 Linux runtimes.
    I can successfully connect to a livecache 7.4 instance, but for some reason when I connect to a 7.6 instance I get a DBI error:
    sql error -4008
    failed: POS(1) Unknown user name/password combination
    My code is:
    $dbMAXDB = DBI->connect("dbi:MaxDB:$o_nodename/$o_SID",$maxdb_usr,$maxdb_pwd, \%dbi_attr) or die;
    The above code works with 7.5 etc, but not for my 1 single 7.6 instance!
    The username/pwd is correct, as using dbmcli with the same username/pwd works.
    Has anyone experienced this, or can someone offer a solution?

    Maybe you use the administrator user instead of the SQL user? MaxDB distinguishes between “Administrators” - as we called them - and “SQL users”. The group of “Administrators” (Database Manager operators, DBM operators) is used for the administration of the database only (start, stop, backup etc.) and cannot be used to open a SQL session. So please make sure that the user is a SQL user.
    Also you might check if you will be able to connect to the database with the command line tool sqlcli using this user.
    Regards,
    Marco

  • LINUX AND DBD-Oracle

    Are there any plans to include the header files necessary to complie the Perl Moduld DBD-Oracle?

    I just compiled DBD::Oracle 1.15.
    This is the interesting part of the output:
    Found /u01/app/oracle/product/10.1.0/client_1/rdbms/demo/demo_rdbms.mk
    Using /u01/app/oracle/product/10.1.0/client_1/rdbms/demo/demo_rdbms.mk
    Reading /u01/app/oracle/product/10.1.0/client_1/rdbms/demo/demo_rdbms.mk
    Reading /u01/app/oracle/product/10.1.0/client_1/rdbms/lib/env_rdbms.mk

  • Instant Client 11.1.0.1, Perl DBD::Oracle, and Kerberos

    Hi all,
    I'm trying to get an Instant Client working so I can connect to remote server and sync the data up with our own. It works, but there is a problem. Basically, if I connect via the Perl DBI and DBD::Oracle, Kerberos authentication bits get screwed up for the rest of the process. If I connect to the remote server, and then a local non-Oracle service via Kerberos, the latter fails. Note that, if done separately, they work fine.
    Looking into it, it appears that it wants to open the file /krb5/krb.conf, which doesn't exist for me (/etc/krb5.conf is the Kerberos config file). I found something online (http://download-west.oracle.com/docs/cd/B10501_01/network.920/a96573/asoappb.htm) that suggests that I should change some KERBEROS* parameters in $ORACLE_HOME/network/admin/sqlnet.ora. Either I'd like to have it try to open the right Kerberos config, or just ignore Kerberos altogether. Unfortunately, I have an old sqlnet.ora, that appears to have been generated by some external interface, and I'd like to maybe do this again, the "right way".
    [koczan@ator] ~ $ cat /s/oracle-csl/network/admin/sqlnet.ora
    # SQLNET.ORA Network Configuration File: /local.gazoo/oracle/network/admin/sqlnet.ora
    # Generated by Oracle configuration tools.
    NAMES.DEFAULT_DOMAIN = cs.wisc.edu
    NAMES.DIRECTORY_PATH= (TNSNAMES)
    The other thing I'm wondering is why it's even looking at Kerberos. Doing ldd on the sqlplus binary, the libraries, and the DBD::Oracle shared library showed no reference to Kerberos.
    [koczan@ator] ~ $ ldd /s/oracle-csl/perl5/lib/site_perl/5.8.6/i686-linux-64int/auto/DBD/Oracle/Oracle.so
    linux-gate.so.1 => (0x0043d000)
    libclntsh.so.11.1 => /s/oracle-csl-0/lib/libclntsh.so.11.1 (0x00783000)
    libocci.so.11.1 => /s/oracle-csl-0/lib/libocci.so.11.1 (0x00110000)
    libociei.so => /s/oracle-csl-0/lib/libociei.so (0x02cf2000)
    libc.so.6 => /lib/libc.so.6 (0x00272000)
    libnnz11.so => /s/oracle-csl-0/lib/libnnz11.so (0x004ea000)
    libdl.so.2 => /lib/libdl.so.2 (0x003b2000)
    libm.so.6 => /lib/libm.so.6 (0x003b6000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x003dd000)
    libnsl.so.1 => /lib/libnsl.so.1 (0x003f4000)
    libaio.so.1 => /usr/lib/libaio.so.1 (0x0040b000)
    libstdc++.so.6 => /s/gcc-3.4.4/i386_cent40/lib/libstdc++.so.6 (0x0215a000)
    libgcc_s.so.1 => /s/gcc-3.4.4/i386_cent40/lib/libgcc_s.so.1 (0x0040d000)
    /lib/ld-linux.so.2 (0x004cf000)
    So, is there something I'm missing? What would be a good way to make everything happy? I tried looking online for this, and asking the DBD::Oracle people, and I couldn't find anything.
    I'm running Instant Client 11.1.0.1 on Red Hat Enterprise Linux 5.1, Perl 5.8.8, DBI 1.602, DBD::Oracle 1.19, Kerberos 1.6.2.
    Thanks. I know this was a lot of info and questions for this, but any help would be appreciated.

    There's no SQLNET.AUTHENTICATION_SERVICES set in my sqlnet.ora. I assume it's using some sort of default or trying everything, is there a way to tell what it's doing even though nothing is set?
    All I need to do is connect via password-based authentication to a remote server. What should SQLNET.AUTHENTICATION_SERVICES be set to for that?
    I couldn't find any clear resource documenting SQLNET.AUTHENTICATION_SERVICES, if you could point me to one that would be excellent.
    Thanks.
    P.S. Here's the entirety of my sqlnet.ora file.
    # SQLNET.ORA Network Configuration File
    # Generated by Oracle configuration tools.
    # Originally on gazoo - /local.gazoo/oracle/network/admin/sqlnet.ora
    # Modified for use with Oracle InstantClient
    NAMES.DEFAULT_DOMAIN = cs.wisc.edu
    NAMES.DIRECTORY_PATH= (TNSNAMES)
    SQLNET.KERBEROS5_CONF=/etc/krb5.conf

  • Cannot install DBD::Oracle perl module with Oracle 11.2.0.3 client

    Hi
    I have been trying to install DBD::Oracle perl module on a Centos 5.7 server which is running Oracle client version 11.2.0.3. I have installed all dependencies prior to attempting installing the same and I am running into the following error -
    /usr/bin/ld: skipping incompatible /app/utiba/oracle/client/lib//libclntsh.so when searching for -lclntsh
    /usr/bin/ld: cannot find -lclntsh
    collect2: ld returned 1 exit status
    make: *** [blib/arch/auto/DBD/Oracle/Oracle.so] Error 1Here are the complete details of my attempt of installation of the perl module -
    [root@tch1testuview1 DBD-Oracle-1.50]# perl Makefile.PL
    Using DBI 1.52 (for perl 5.008008 on x86_64-linux-thread-multi) installed in /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/
    Configuring DBD::Oracle for perl 5.008008 on linux (x86_64-linux-thread-multi)
    Remember to actually *READ* the README file! Especially if you have any problems.
    Installing on a linux, Ver#2.6
    Using Oracle in /app/utiba/oracle/client
    DEFINE _SQLPLUS_RELEASE = "1102000300" (CHAR)
    Oracle version 11.2.0.3 (11.2)
    Found /app/utiba/oracle/client/rdbms/lib/ins_rdbms.mk
    Using /app/utiba/oracle/client/rdbms/lib/ins_rdbms.mk
    Your LD_LIBRARY_PATH env var is set to '/app/utiba/oracle/client/lib:/lib:/usr/lib'
    Reading /app/utiba/oracle/client/rdbms/lib/ins_rdbms.mk
    Reading /app/utiba/oracle/client/rdbms/lib/env_rdbms.mk
    WARNING: Oracle /app/utiba/oracle/client/rdbms/lib/ins_rdbms.mk doesn't define a 'build' rule.
    WARNING: I will now try to guess how to build and link DBD::Oracle for you.
             This kind of guess work is very error prone and Oracle-version sensitive.
             It is possible that it won't be supported in future versions of DBD::Oracle.
             *PLEASE* notify dbi-users about exactly _why_ you had to build it this way.
    Found header files in /app/utiba/oracle/client/rdbms/public.
    client_version=11.2
    DEFINE= -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0.3\" -DORA_OCI_102 -DORA_OCI_112
    Checking for functioning wait.ph
    System: perl5.008008 linux builder10.centos.org 2.6.18-53.el5 #1 smp mon nov 12 02:14:55 est 2007 x86_64 x86_64 x86_64 gnulinux
    Compiler:   gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm
    Linker:     /usr/bin/ld
    Sysliblist: -ldl -lm -lpthread -lnsl -lirc -lipgo
    Oracle makefiles would have used these definitions but we override them:
      CC:       $(GCC)
      CFLAGS:   $(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(PFLAGS)\
            $(SHARED_CFLAG) $(USRFLAGS)
               [$(GFLAG) -O2 $(CDEBUG) $(CCFLAGS) -I/app/utiba/oracle/client/rdbms/demo -I/app/utiba/oracle/client/rdbms/public -I/app/utiba/oracle/client/plsql/public -I/app/utiba/oracle/client/network/public -DLINUX -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -DSLTS_ENABLE -DSLMXMX_ENABLE -D_REENTRANT -DNS_THREADS -DLDAP_CM $(LPFLAGS) $(PLSQLNCGFLAGS) $(USRFLAGS)]
      LDFLAGS:  -o $@ $(LDOBJSZ) $(LDPATHFLAG)$(PRODLIBHOME) $(LDPATHFLAG)$(LIBHOME) $(LDPATHFLAG)$(LIBHOME)stubs/ $(LDPATHFLAG)$(LIBHOME) $(LLIBIRC)
               [-o $@ -m32 -L/app/utiba/oracle/client/rdbms/lib/ -L$(LIBHOME) -L$(LIBHOME)stubs/ -L$(LIBHOME) -lirc -lipgo ]
    Linking with  -lclntsh -ldl -lm -lpthread -lnsl -lirc -lipgo -ldl -lm  [from $(OCISHAREDLIBS)]
    LD_RUN_PATH=/app/utiba/oracle/client/lib
    Using DBD::Oracle 1.50.
    Using DBD::Oracle 1.50.
    Using DBI 1.52 (for perl 5.008008 on x86_64-linux-thread-multi) installed in /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/
    Writing Makefile for DBD::Oracle
    ***  If you have problems...
         read all the log printed above, and the README and README.help.txt files.
         (Of course, you have read README by now anyway, haven't you?)
    [root@tch1testuview1 DBD-Oracle-1.50]# make
    Skip blib/lib/DBD/Oracle/Troubleshooting/Cygwin.pod (unchanged)
    Skip blib/lib/DBD/Oracle.pm (unchanged)
    Skip blib/lib/oraperl.ph (unchanged)
    Skip blib/arch/auto/DBD/Oracle/Oracle.h (unchanged)
    Skip blib/lib/DBD/Oracle/Troubleshooting/Vms.pod (unchanged)
    Skip blib/lib/DBD/Oracle/Troubleshooting/Linux.pod (unchanged)
    Skip blib/lib/DBD/Oracle/GetInfo.pm (unchanged)
    Skip blib/lib/DBD/Oracle/Troubleshooting.pod (unchanged)
    Skip blib/arch/auto/DBD/Oracle/dbdimp.h (unchanged)
    Skip blib/lib/DBD/Oracle/Troubleshooting/Hpux.pm (unchanged)
    Skip blib/arch/auto/DBD/Oracle/ocitrace.h (unchanged)
    Skip blib/lib/Oraperl.pm (unchanged)
    Skip blib/lib/DBD/Oracle/Troubleshooting/Sun.pod (unchanged)
    Skip blib/lib/DBD/Oracle/Troubleshooting/Macos.pod (unchanged)
    Skip blib/lib/DBD/Oracle/Troubleshooting/Aix.pod (unchanged)
    Skip blib/lib/DBD/Oracle/Object.pm (unchanged)
    Skip blib/lib/DBD/Oracle/Troubleshooting/Win64.pod (unchanged)
    Skip blib/arch/auto/DBD/Oracle/mk.pm (unchanged)
    Skip blib/lib/DBD/Oracle/Troubleshooting/Win32.pod (unchanged)
    gcc -c  -I/app/utiba/oracle/client/rdbms/public -I/app/utiba/oracle/client/rdbms/demo -I/app/utiba/oracle/client/rdbms/public -I/app/utiba/oracle/client/plsql/public -I/app/utiba/oracle/client/network/public -I/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -DVERSION=\"1.50\" -DXS_VERSION=\"1.50\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0.3\" -DORA_OCI_102 -DORA_OCI_112 Oracle.c
    gcc -c  -I/app/utiba/oracle/client/rdbms/public -I/app/utiba/oracle/client/rdbms/demo -I/app/utiba/oracle/client/rdbms/public -I/app/utiba/oracle/client/plsql/public -I/app/utiba/oracle/client/network/public -I/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -DVERSION=\"1.50\" -DXS_VERSION=\"1.50\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0.3\" -DORA_OCI_102 -DORA_OCI_112 dbdimp.c
    dbdimp.c: In function ‘fb_ary_cb_alloc’:
    dbdimp.c:324: warning: comparison is always false due to limited range of data type
    dbdimp.c:325: warning: comparison is always false due to limited range of data type
    dbdimp.c:326: warning: comparison is always false due to limited range of data type
    dbdimp.c:327: warning: comparison is always false due to limited range of data type
    dbdimp.c:328: warning: comparison is always false due to limited range of data type
    dbdimp.c: In function ‘fb_ary_alloc’:
    dbdimp.c:344: warning: comparison is always false due to limited range of data type
    dbdimp.c:345: warning: comparison is always false due to limited range of data type
    dbdimp.c:346: warning: comparison is always false due to limited range of data type
    dbdimp.c:347: warning: comparison is always false due to limited range of data type
    gcc -c  -I/app/utiba/oracle/client/rdbms/public -I/app/utiba/oracle/client/rdbms/demo -I/app/utiba/oracle/client/rdbms/public -I/app/utiba/oracle/client/plsql/public -I/app/utiba/oracle/client/network/public -I/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -DVERSION=\"1.50\" -DXS_VERSION=\"1.50\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0.3\" -DORA_OCI_102 -DORA_OCI_112 oci8.c
    oci8.c: In function ‘ora_blob_read_mb_piece’:
    oci8.c:1804: warning: comparison is always false due to limited range of data type
    oci8.c: In function ‘describe_obj_by_tdo’:
    oci8.c:3256: warning: comparison is always false due to limited range of data type
    oci8.c: In function ‘ora_describe’:
    oci8.c:3480: warning: comparison is always false due to limited range of data type
    oci8.c: In function ‘ora_st_fetch’:
    oci8.c:3953: warning: unused variable ‘imp_xxh’
    Running Mkbootstrap for DBD::Oracle ()
    chmod 644 Oracle.bs
    rm -f blib/arch/auto/DBD/Oracle/Oracle.so
    LD_RUN_PATH="/app/utiba/oracle/client/lib" gcc  -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic Oracle.o dbdimp.o oci8.o  -o blib/arch/auto/DBD/Oracle/Oracle.so  \
               -L/app/utiba/oracle/client/lib/ -lclntsh -ldl -lm -lpthread -lnsl -lirc -lipgo -ldl -lm      \
    /usr/bin/ld: skipping incompatible /app/utiba/oracle/client/lib//libclntsh.so when searching for -lclntsh
    /usr/bin/ld: cannot find -lclntsh
    collect2: ld returned 1 exit status
    make: *** [blib/arch/auto/DBD/Oracle/Oracle.so] Error 1I am sure that installing a previous(older) version of oracle client will fix this issue i.e. either 11.2.0.1 or older (that is tested) but I want to know if it is possible to resolve the above issue with a work around and not having to install a previous version.
    Fyi.. I've tried to install DBD::Oracle version 1.24 and 1.50 but that doesn't seem to make any difference. I couldn't find any related thread either for this error so I desperately need a solution to the same(if any).
    If anyone can help here, would really appreciate it or else, I will have no choice but to install previous version of oracle client.
    Thanks
    Edited by: 956308 on Aug 31, 2012 6:55 AM
    Edited by: 956308 on Aug 31, 2012 6:57 AM

    Contents of the response file:
    oracle.install.responseFileVersion=http://www.oracle.com/2007/install/rspfmt_clientinstall_response_schema_v11_2_0
    ORACLE_HOSTNAME=slc00caz
    UNIX_GROUP_NAME=oracle
    INVENTORY_LOCATION=/home/psadm1/oraInventory
    SELECTED_LANGUAGES=en
    ORACLE_HOME=/opt/oracle/psft/pt/oracle-client/11.2.0.x
    ORACLE_BASE=/opt/oracle/psft/pt/oracle-client
    oracle.install.client.installType=Custom
    oracle.install.client.upgrading=false
    oracle.install.client.customComponents=oracle.rdbms.util:11.2.0.3.0,oracle.javavm.client:11.2.0.3.0,oracle.sqlplus:11.2.0.3.0,oracle.dbjava.jdbc:11.2.0.3.0,oracle.rdbms.oci:11.2.0.3.0,oracle.xdk:11.2.0.3.0,oracle.network.aso:11.2.0.3.0,oracle.assistants.oemlt:11.2.0.3.0,oracle.network.client:11.2.0.3.0,oracle.odbc:11.2.0.3.0,oracle.dbdev:11.2.0.3.0
    oracle.install.client.schedulerAgentHostName=
    oracle.install.client.schedulerAgentPortNumber=
    oracle.installer.autoupdates.option=SKIP_UPDATES
    oracle.installer.autoupdates.downloadUpdatesLoc=
    AUTOUPDATES_MYORACLESUPPORT_USERNAME=
    AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
    PROXY_HOST=
    PROXY_PORT=0
    PROXY_USER=
    PROXY_PWD=
    PROXY_REALM=

  • Problems to compile Perl DBD::Oracle with InstantClient 11.1.0.7

    machine:~/.cpan/build/DBD-Oracle-1.22-WXjXWy# perl Makefile.PL
    Using DBI 1.607 (for perl 5.010000 on x86_64-linux-gnu-thread-multi) installed in /usr/local/lib/perl/5.10.0/auto/DBI/
    Configuring DBD::Oracle for perl 5.010000 on linux (x86_64-linux-gnu-thread-multi)
    Remember to actually READ the README file! Especially if you have any problems.
    Installing on a linux, Ver#2.6
    Using Oracle in /usr/lib/oracle/11.1/client64
    DEFINE SQLPLUSRELEASE = "1101000700" (CHAR)
    Oracle version 11.1.0.7 (11.1)
    Found /usr/share/oracle/11.1/client64/demo.mk
    Found /usr/share/oracle/11.1/client64/demo.mk
    Using /usr/share/oracle/11.1/client64/demo.mk
    Your LD_LIBRARY_PATH env var is set to '/usr/lib/oracle/11.1/client64/lib'
    Reading /usr/share/oracle/11.1/client64/demo.mk
    WARNING: Oracle /usr/share/oracle/11.1/client64/demo.mk doesn't define a 'build' rule.
    WARNING: I will now try to guess how to build and link DBD::Oracle for you.
    This kind of guess work is very error prone and Oracle-version sensitive.
    It is possible that it won't be supported in future versions of DBD::Oracle.
    PLEASE notify dbi-users about exactly why you had to build it this way.
    Found header files in /usr/include/oracle/11.1/client64.
    Checking for functioning wait.ph
    System: perl5.010000 linux excelsior 2.6.26-1-vserver-amd64 #1 smp sat nov 8 20:24:14 utc 2008 x86_64 gnulinux
    Compiler: cc -O2 -g -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
    Linker: /usr/bin/ld
    Sysliblist:
    Oracle makefiles would have used these definitions but we override them:
    CC: /usr/bin/g++
    LDFLAGS: -g
    [-g]
    Linking with -L../../ -locci -lclntsh -lpthread [from $(CCLIB)]
    Checking if your kit is complete...
    Warning: the following files are missing in your kit:
    META.yml
    Please inform the author.
    Warning: -L../../ changed to -L/root/.cpan/build/DBD-Oracle-1.22-WXjXWy/../../
    LD_RUN_PATH=/usr/lib/oracle/11.1/client64/lib
    Using DBD::Oracle 1.22.
    Using DBD::Oracle 1.22.
    Using DBI 1.607 (for perl 5.010000 on x86_64-linux-gnu-thread-multi) installed in /usr/local/lib/perl/5.10.0/auto/DBI/
    Writing Makefile for DBD::Oracle
    *** If you have problems...
    read all the log printed above, and the README and README.help.txt files.
    (Of course, you have read README by now anyway, haven't you?)
    Everything works fine right now ;-) but now:
    machine:~/.cpan/build/DBD-Oracle-1.22-WXjXWy# make
    Skip blib/lib/DBD/Oracle.pm (unchanged)
    Skip blib/lib/oraperl.ph (unchanged)
    Skip blib/arch/auto/DBD/Oracle/dbdimp.h (unchanged)
    Skip blib/arch/auto/DBD/Oracle/ocitrace.h (unchanged)
    Skip blib/lib/Oraperl.pm (unchanged)
    Skip blib/arch/auto/DBD/Oracle/Oracle.h (unchanged)
    Skip blib/lib/DBD/Oracle/GetInfo.pm (unchanged)
    Skip blib/arch/auto/DBD/Oracle/mk.pm (unchanged)
    cc -c -I/usr/include/oracle/11.1/client64 -I/usr/local/lib/perl/5.10.0/auto/DBI -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.22\" -DXS_VERSION=\"1.22\" -fPIC "-I/usr/lib/perl/5.10/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"11.1.0.7\" Oracle.c
    Oracle.xsi: In function 'XS_DBD__Oracle__db_disconnect':
    Oracle.xsi:306: warning: format '%ld' expects type 'long int', but argument 2 has type 'I32'
    Oracle.xsi:306: warning: format '%ld' expects type 'long int', but argument 3 has type 'I32'
    Oracle.xsi: In function 'XS_DBD__Oracle__db_DESTROY':
    Oracle.xsi:352: warning: format '%ld' expects type 'long int', but argument 2 has type 'I32'
    Oracle.xsi:352: warning: format '%ld' expects type 'long int', but argument 3 has type 'I32'
    Oracle.xsi:380: warning: format '%ld' expects type 'long int', but argument 2 has type 'I32'
    Oracle.xsi:380: warning: format '%ld' expects type 'long int', but argument 3 has type 'I32'
    Oracle.xsi: In function 'XS_DBD__Oracle__st_finish':
    Oracle.xsi:675: warning: format '%ld' expects type 'long int', but argument 2 has type 'I32'
    Oracle.xsi:675: warning: format '%ld' expects type 'long int', but argument 3 has type 'I32'
    Oracle.xsi: In function 'XS_DBD__Oracle__st_DESTROY':
    Oracle.xsi:752: warning: format '%ld' expects type 'long int', but argument 2 has type 'I32'
    Oracle.xsi:752: warning: format '%ld' expects type 'long int', but argument 3 has type 'I32'
    Oracle.xsi:766: warning: format '%ld' expects type 'long int', but argument 2 has type 'I32'
    Oracle.xsi:766: warning: format '%ld' expects type 'long int', but argument 3 has type 'I32'
    cc -c -I/usr/include/oracle/11.1/client64 -I/usr/local/lib/perl/5.10.0/auto/DBI -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.22\" -DXS_VERSION=\"1.22\" -fPIC "-I/usr/lib/perl/5.10/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"11.1.0.7\" dbdimp.c
    dbdimp.c: In function 'ora_db_login6':
    dbdimp.c:528: warning: format '%d' expects type 'int', but argument 8 has type 'size_t'
    dbdimp.c:535: warning: format '%d' expects type 'int', but argument 8 has type 'size_t'
    dbdimp.c:738: warning: format '%d' expects type 'int', but argument 7 has type 'size_t'
    dbdimp.c:738: warning: format '%d' expects type 'int', but argument 9 has type 'long unsigned int'
    dbdimp.c:787: warning: format '%ld' expects type 'long int', but argument 2 has type 'I32'
    dbdimp.c:787: warning: format '%ld' expects type 'long int', but argument 3 has type 'I32'
    dbdimp.c: In function 'ora_st_cancel':
    dbdimp.c:842: warning: format '%lu' expects type 'long unsigned int', but argument 8 has type 'int'
    dbdimp.c: In function 'ora_db_disconnect':
    dbdimp.c:879: warning: format '%ld' expects type 'long int', but argument 2 has type 'I32'
    dbdimp.c:879: warning: format '%ld' expects type 'long int', but argument 3 has type 'I32'
    dbdimp.c: In function 'ora_db_STORE_attrib':
    dbdimp.c:976: warning: value computed is not used
    dbdimp.c: In function 'createxmlfromstring':
    dbdimp.c:1058: warning: format '%d' expects type 'int', but argument 3 has type 'STRLEN'
    dbdimp.c:1066: warning: format '%ld' expects type 'long int', but argument 2 has type 'int'
    dbdimp.c:1077: warning: passing argument 4 of 'OCILobWriteAppend' from incompatible pointer type
    dbdimp.c: In function 'dbd_preparse':
    dbdimp.c:1243: warning: value computed is not used
    dbdimp.c: In function 'dbd_rebind_ph_varchar2_table':
    dbdimp.c:1546: warning: format '%d' expects type 'int', but argument 3 has type 'STRLEN'
    dbdimp.c:1554: warning: format '%d' expects type 'int', but argument 3 has type 'STRLEN'
    dbdimp.c:1584: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'long unsigned int'
    dbdimp.c:1584: warning: format '%u' expects type 'unsigned int', but argument 8 has type 'long unsigned int'
    dbdimp.c: In function 'dbd_rebind_ph_number_table':
    dbdimp.c:1991: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'long unsigned int'
    dbdimp.c:1991: warning: format '%u' expects type 'unsigned int', but argument 8 has type 'long unsigned int'
    dbdimp.c: In function 'dbd_rebind_ph_char':
    dbdimp.c:2197: warning: format '%d' expects type 'int', but argument 5 has type 'IV'
    dbdimp.c: In function 'pp_exec_rset':
    dbdimp.c:2412: warning: format '%ld' expects type 'long int', but argument 2 has type 'I32'
    dbdimp.c:2412: warning: format '%ld' expects type 'long int', but argument 3 has type 'I32'
    dbdimp.c: In function 'ora_bind_ph':
    dbdimp.c:2743: warning: format '%d' expects type 'int', but argument 2 has type 'IV'
    dbdimp.c:2752: warning: format '%d' expects type 'int', but argument 2 has type 'IV'
    dbdimp.c:2786: warning: format '%d' expects type 'int', but argument 3 has type 'IV'
    dbdimp.c:2799: warning: unknown conversion type character '_' in format
    dbdimp.c: In function 'ora_st_execute':
    dbdimp.c:3018: warning: format '%ld' expects type 'long int', but argument 2 has type 'I32'
    dbdimp.c:3018: warning: format '%ld' expects type 'long int', but argument 3 has type 'I32'
    dbdimp.c: In function 'ora_st_execute_array':
    dbdimp.c:3328: warning: unused variable 'sv2'
    dbdimp.c: In function 'ora_st_finish':
    dbdimp.c:3473: warning: format '%ld' expects type 'long int', but argument 2 has type 'I32'
    dbdimp.c:3473: warning: format '%ld' expects type 'long int', but argument 3 has type 'I32'
    dbdimp.c:3491: warning: format '%lu' expects type 'long unsigned int', but argument 8 has type 'int'
    dbdimp.c: In function 'ora_st_destroy':
    dbdimp.c:3587: warning: format '%lu' expects type 'long unsigned int', but argument 8 has type 'int'
    dbdimp.c: In function 'ora_st_STORE_attrib':
    dbdimp.c:3672: warning: value computed is not used
    dbdimp.c: In function 'ora_st_FETCH_attrib':
    dbdimp.c:3720: warning: value computed is not used
    cc -c -I/usr/include/oracle/11.1/client64 -I/usr/local/lib/perl/5.10.0/auto/DBI -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.22\" -DXS_VERSION=\"1.22\" -fPIC "-I/usr/lib/perl/5.10/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"11.1.0.7\" oci8.c
    oci8.c: In function 'fetch_cleanup_rset':
    oci8.c:974: warning: format '%ld' expects type 'long int', but argument 2 has type 'I32'
    oci8.c:974: warning: format '%ld' expects type 'long int', but argument 3 has type 'I32'
    oci8.c: In function 'fetch_func_rset':
    oci8.c:1031: warning: format '%ld' expects type 'long int', but argument 2 has type 'I32'
    oci8.c:1031: warning: format '%ld' expects type 'long int', but argument 3 has type 'I32'
    oci8.c: In function 'dbd_rebind_ph_lob':
    oci8.c:1095: warning: format '%ld' expects type 'long int', but argument 2 has type 'ub4'
    oci8.c: In function 'get_attr_val':
    oci8.c:1655: warning: unknown conversion type character 'O' in format
    oci8.c:1655: warning: format '%s' expects type 'char *', but argument 6 has type 'size_t *'
    oci8.c:1655: warning: too many arguments for format
    oci8.c:1672: warning: unknown conversion type character 'O' in format
    oci8.c:1672: warning: format '%s' expects type 'char *', but argument 6 has type 'size_t *'
    oci8.c:1672: warning: too many arguments for format
    oci8.c: In function 'get_object':
    oci8.c:1911: warning: format '%d' expects type 'int', but argument 6 has type 'struct OCIIter **'
    oci8.c: In function 'fetch_get_piece':
    oci8.c:2024: warning: format '%d' expects type 'int', but argument 6 has type 'ub1 *'
    oci8.c:2047: warning: format '%d' expects type 'int', but argument 7 has type 'ub4 *'
    oci8.c:2056: warning: format '%lu' expects type 'long unsigned int', but argument 8 has type 'int'
    oci8.c:2061: warning: format '%ld' expects type 'long int', but argument 2 has type 'I32'
    oci8.c:2061: warning: format '%ld' expects type 'long int', but argument 3 has type 'I32'
    oci8.c: In function 'ora_describe':
    oci8.c:2823: warning: format '%ld' expects type 'long int', but argument 2 has type 'ub4'
    oci8.c:2963: warning: format '%d' expects type 'int', but argument 6 has type 'void *'
    oci8.c: In function 'ora_st_fetch':
    oci8.c:3048: warning: format '%lu' expects type 'long unsigned int', but argument 8 has type 'int'
    oci8.c:3063: warning: format '%lu' expects type 'long unsigned int', but argument 8 has type 'int'
    oci8.c:3074: warning: format '%lu' expects type 'long unsigned int', but argument 8 has type 'int'
    oci8.c:3085: warning: format '%ld' expects type 'long int', but argument 2 has type 'I32'
    oci8.c:3085: warning: format '%ld' expects type 'long int', but argument 3 has type 'I32'
    oci8.c:3092: warning: format '%ld' expects type 'long int', but argument 2 has type 'I32'
    oci8.c:3092: warning: format '%ld' expects type 'long int', but argument 3 has type 'I32'
    oci8.c: In function 'init_lob_refetch':
    oci8.c:3474: warning: value computed is not used
    oci8.c:3549: warning: value computed is not used
    oci8.c:3556: warning: format '%ld' expects type 'long int', but argument 2 has type 'ub4'
    oci8.c:3596: warning: format '%ld' expects type 'long int', but argument 2 has type 'int'
    Running Mkbootstrap for DBD::Oracle ()
    chmod 644 Oracle.bs
    rm -f blib/arch/auto/DBD/Oracle/Oracle.so
    LD_RUN_PATH="/usr/lib/oracle/11.1/client64/lib" cc -shared -O2 -g -L/usr/local/lib Oracle.o dbdimp.o oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.so \
    -L/usr/lib/oracle/11.1/client64/lib -L/root/.cpan/build/DBD-Oracle-1.22-WXjXWy/../.. -locci -lclntsh -lpthread \
    chmod 755 blib/arch/auto/DBD/Oracle/Oracle.so
    cp Oracle.bs blib/arch/auto/DBD/Oracle/Oracle.bs
    chmod 644 blib/arch/auto/DBD/Oracle/Oracle.bs
    /usr/bin/perl "-Iblib/arch" "-Iblib/lib" ora_explain.PL ora_explain
    Extracted ora_explain from ora_explain.PL with variable substitutions.
    cp ora_explain blib/script/ora_explain
    /usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/ora_explain
    Manifying blib/man1/ora_explain.1p
    Manifying blib/man3/DBD::Oracle.3pm
    Manifying blib/man3/DBD::Oraperl.3pm
    Some clues or just forget it!
    Thanx, Alejandro

    I'm also a PostgreSQL man, so it should be easy to communicate.
    I can reproduce your problem with DBD::Oracle, and I guess that your problem is that the database is on a different machine, while "make test" assumes that it is on the same machine (like when you unset PGHOST in PostgreSQL).
    The error message means that for a local database Oracle expects a local "database name" in the environment variable ORACLE_SID, but the environment variable is unset (roughly equivalent to PGDATABASE).
    When you encounter connection problems with DBI, it's always a good idea to try to connect in the same way with the command line utility "sqlplus".
    In your case, I would say that the equivalent connection attempt with sqlplus would be:
    sqlplus scott/tiger
    which will probably give you the same error message, right?
    With your tnsnames.ora, I would recommend that you set the environment variable TWO_TASK to "caw".
    Then Oracle will look for the entry "caw" in tnsnames.ora (this is roughly comparable to setting PGSERVICE in PostgreSQL, where PGSYSCONFDIR corresponds to Oracle TNS_ADMIN).
    If your test login is not "scott/tiger", set ORACLE_USERID as described in README.login.txt.
    Yours,
    Laurenz Albe

  • DBD::Oracle works via perl CLI but not thru Apache

    Hi -
    I'm beating my head against a wall.
    We're trying to transition from our old Solaris machines to newer, virtual Linux machines. We're running CentOS, x86-64.
    Oracle Instant Client v11.2
    Perl: ActivePerl 5.14.2 built for x86_64-linux-thread-multi
    Apache: Apache/2.2.19 (Unix)
    DBI: v1.617
    DBD::Oracle v1.30
    I downloaded and installed the Oracle Instant Client RPMs - basic, devel, and sqlplus for 64-bit Linux.
    I can connect to a database via SQL*Plus just fine.
    I can run the following Perl script from the command line just fine.
    #!/bin/env perl
    BEGIN {
       $ENV{'ORACLE_BASE'} = "/usr/lib/oracle";
       $ENV{'ORACLE_HOME'} = "$ENV{'ORACLE_BASE'}/11.2/client64";
       $ENV{'LD_LIBRARY_PATH'} = "$ENV{'ORACLE_HOME'}";
       $ENV{'TNS_ADMIN'} = $ENV{'ORACLE_HOME'}
    use DBI;
    #use DBD::Oracle;
    use CGI;
    my $q = new CGI();
    print $q->header();
    print $q->start_html("Oracle Test");
    print "Hello World!";
    print $q->p(`which perl`);
    print $q->p("PATH: " . $ENV{'PATH'}) . "\n";
    print $q->p("ORACLE_BASE: " . $ENV{'ORACLE_BASE'}) . "\n";
    print $q->p("ORACLE_HOME: " . $ENV{'ORACLE_HOME'}) . "\n";
    print $q->p("LD_LIBRARY_PATH: " . $ENV{'LD_LIBRARY_PATH'}) . "\n";
    print $q->p("TNS_ADMIN: " . $ENV{'TNS_ADMIN'}) . "\n";
    print "\n";
    my $dbh = DBI->connect("dbi:Oracle:my-oracle-server.com:1521/mydatabase",
       "username", "password") || die $DBI::errstr;
    my $sql = "SELECT * FROM cs_empnums";
    my $ary_ref = $dbh->selectall_arrayref($sql);
    print $q->table({border=>1, cellpadding=>5, cellspacing=>0});
    foreach my $row (@{$ary_ref})  {
       print $q->TR($q->td($row)) . "\n";
    print $q->end_table();
    print $q->end_html();However, when I run it from a browser thru Apache, I get the following output:
    Hello World!
    /var/www/apps/ActivePerl/bin/perl
    PATH: /var/www/apps/ActivePerl/bin:/usr/bin:/bin
    ORACLE_BASE: /usr/lib/oracle
    ORACLE_HOME: /usr/lib/oracle/11.2/client64
    LD_LIBRARY_PATH: /usr/lib/oracle/11.2/client64
    TNS_ADMIN: /usr/lib/oracle/11.2/client64
    and the following in my apache error log:
    [Thu Mar 01 18:51:47 2012] [error] [client 172.22.15.177] install_driver(Oracle) failed: Can't load '/var/www/apps/ActivePerl-5.14/lib/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file: No such file or directory at /var/www/apps/ActivePerl-5.14/lib/DynaLoader.pm line 191.
    [Thu Mar 01 18:51:47 2012] [error] [client 172.22.15.177]  at (eval 13) line 3
    [Thu Mar 01 18:51:47 2012] [error] [client 172.22.15.177] Compilation failed in require at (eval 13) line 3.
    [Thu Mar 01 18:51:47 2012] [error] [client 172.22.15.177] Perhaps a required shared library or dll isn't installed where expected
    [Thu Mar 01 18:51:47 2012] [error] [client 172.22.15.177]  at /var/www/web_sites/htdocs/cgi-bin/oracle_test.pl line 27For one thing, I'm not sure why it's looking for libclntsh.so.10.1, when i have OIC v11 installed. But I symlinked the libclntsh.so file via libclntsh.so.10.1, which is enabling my script to run from the command line.
    But it's still not working thru Apache.
    I confirmed that all the environment variables are set correctly - tho I have to set them explicitly in my Perl script - for some reason it's not picking them up in my envvars file... just the PATH variable.
    Any ideas?

    You do not need ORACLE_BASE or ORACLE_HOME with instant client.
    If DBD::Oracle is looking for libclntsh.so.10.1, that means that the binary you used was built against Oracle 10.
    Usually creating a symbolic link to a different library version is a big no-no, but in this very special case it is ok, since event Oracle's documentation states that they are binary compatible.
    As to your main problem, I can't guess what causes this.
    Have you tried putting the Instant Client path into /etc/ld.so.conf and running ldconfig? Maybe that solves the problem.
    If you can "strace" the process, you would see for what file it is looking and where. Maybe that gives you a clue.
    Hmmm... I just looked at http://perldoc.perl.org/DynaLoader.html , and I get the idea that it does not consult LD_LIBRARY_PATH.
    Rather, it uses @dl_library_path which is initialized with LD_LIBRARY_PATH, presumably when the module is loaded.
    Now if httpd, as a setuid program, ignores your LD_LIBRARY_PATH, @dl_library_path would not contain your Instant Client directory.
    So try either to change @dl_library_path in your Perl script or SetEnv LD_LIBRARY_PATH in your httpd.conf.
    All of this is guesswork since I know too little about Perl or Apache.
    Yours,
    Laurenz Albe

  • Java/JDBC slow compared to Perl/DBD-Oracle

    Hopefully the subject is inflammatory enough to get some responses :-)
    I'm thinking about converting a database-intensive Perl application to Java, but it's fairly database intensive. Things look pretty straightforward, but Oracle's OCI JDBC driver seems to run at about 2/3 the speed of Perl with the DBD-Oracle driver.
    For comparison, here's the Java version:
    === SelectTest.java
    import java.sql.*;
    import oracle.jdbc.driver.*;
    public class SelectTest {
    public static void main(String args[]) throws Exception {
    int count = Integer.parseInt(args[0]);
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn = DriverManager.getConnection(
    "jdbc:oracle:oci8:@orcl.world",
    "scott", "tiger");
    String statement = "select * from dual";
    OraclePreparedStatement stmt =
    (OraclePreparedStatement) conn.prepareStatement(statement);
    stmt.defineColumnType(1, Types.VARCHAR);
    stmt.setRowPrefetch(1);
    for (int i = 0; i < count; i++) {
    ResultSet rset = stmt.executeQuery();
    rset.next();
    String s = rset.getString(1);
    rset.close();
    stmt.close();
    === End of SelectTest.java
    and here's the Perl version:
    === select_test.pl
    #!/usr/bin/perl -w
    use strict;
    use DBI;
    my $dbh = DBI->connect('dbi:Oracle:dev.cag', 'cag', 'gac');
    my $sth = $dbh->prepare('select * from dual');
    for (1 .. $ARGV[0]) {
    $sth->execute;
    my @data = $sth->fetchrow;
    $sth->finish;
    === End of select_test.pl
    On my Linux box at home, 'time java SelectTest 1' gives me:
    1.120u 0.140s 0:01.35 93.3% 0+0k 0+0io 4334pf+0w
    and 'time java SelectTest 1000' gives me:
    2.290u 0.370s 0:03.87 68.7% 0+0k 0+0io 4334pf+0w
    So the OCI driver can execute about 400 execute/next's per second.
    In comparison, 'time select_test.pl 1' gives:
    0.550u 0.070s 0:00.74 83.7% 0+0k 0+0io 1638pf+0w
    and 'time select_test.pl 1000' gives:
    1.210u 0.220s 0:02.41 59.3% 0+0k 0+0io 1638pf+0w
    So the Perl/DBD-Oracle runs at about 600 execute/fetch's per second.
    The results are similar on our Sun 3500.
    I'm at a loss to explain this. I'm explicitly setting the prefetch, using the Oracle defineColumnType extension, and preparing the statement outside the loop. Amazingly, the Perl program beats it with practically no optimization.
    This is actually a best-case scenario for the JDBC driver. In the worst-case scenario, the same program running against a table with 50 columns runs about 6 times faster with Perl/DBD than with Java/JDBC. (Large records seem to be a particularly bad case for the JDBC driver).
    These tests are actually highly important for our application, which frequently issues single-row selects.
    I'm desperate to increase the JDBC performance. Every other test I've run shows Java running several times faster than Perl. Once I can get this ironed out, we should be all set.
    For the record, the tests were run using JDK1.2 against classes111.zip. The results were similar using classes12.zip.
    Does anyone have any suggestions? I'm hoping there's something obvious I'm missing that will speed up my code to acceptable levels.

    ddankwerth,
    Actually, we're using persistent connections with mod_perl, so I'm not anticipating a big speed boost there.
    Do you have a code example where the thin driver outperforms the OCI driver? In my tests, it's at least 30% slower.
    One thing I noticed after posting my question was that the total idle time for the JDBC code was about 50% higher than for the Perl code. This makes me think that the JDBC driver is making more calls to the DBMS than necessary.
    Is Oracle actively tuning the JDBC drivers? I get the impression from the classes12 README that the development is focusing more on keeping up with the JDBC standard than with performance.
    Does anyone know if there any plans to improve performance?

  • How can I get CPAN  DBD::Oracle to install with XE?

    It can't find oracle.mk so it dies. I'm also going to contact the DBD::Oracle module author, but just in case someone on these forums has already solved this, I'm also posting here. The output from the install was:
    CPAN.pm: Going to build T/TI/TIMB/DBD-Oracle-1.16.tar.gz
    Using DBI 1.48 (for perl 5.008005 on i386-linux-thread-multi) installed in /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/
    Configuring DBD::Oracle ...
    Remember to actually READ the README file!Especially if you have any problems.
    Using Oracle in /usr/lib/oracle/xe/app/oracle/product/10.2.0/server
    DEFINE SQLPLUSRELEASE = "1002000100" (CHAR)
    Oracle version 10.2.0.1 (10.2)
    Unable to locate an oracle.mk, proc.mk or other suitable *.mk
    file in your Oracle installation. (I looked in
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/lib/oracle.mk /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/demo/oracle.mk /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/demo/demo_rdbms.mk /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/otrace/demo/atmoci.mk /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/precomp/demo/proc/proc.mk /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/precomp/demo/proc/demo_proc.mk /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/proc/lib/proc.mk /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/proc16/lib/proc16.mk)
    The oracle.mk (or demo_rdbms.mk) file is part of the Oracle
    RDBMS product. The proc.mk (or demo_proc.mk) file is part of
    the Oracle Pro*C product. You need to build DBD::Oracle on a
    system which has one of these Oracle components installed.
    (Other *.mk files such as the env_*.mk files will not work.)
    In the unlikely event that a suitable *.mk file is installed
    somewhere non-standard you can specify where it is using the -m option:
    perl Makefile.PL -m /path/to/your.mk
    See README.clients for more information and some alternatives.
    at Makefile.PL line 922.
    So is there a different *.mk file that can be specified per the above?

    As an FYI I tried demo_xe.mk on my Fedora Core 4 box (Perl 5.8.6) and got this.
    Using DBI 1.48 (for perl 5.008006 on i386-linux-thread-multi) installed in /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/auto/DBI/
    Configuring DBD::Oracle ...
    Remember to actually READ the README file!Especially if you have any problems.
    Using Oracle in /usr/lib/oracle/xe/app/oracle/product/10.2.0/server
    DEFINE SQLPLUSRELEASE = "1002000100" (CHAR)
    Oracle version 10.2.0.1 (10.2)
    Found /opt/oracle/xe/app/oracle/product/10.2.0/server/rdbms/demo/demo_xe.mk
    Using /opt/oracle/xe/app/oracle/product/10.2.0/server/rdbms/demo/demo_xe.mk
    Reading /opt/oracle/xe/app/oracle/product/10.2.0/server/rdbms/demo/demo_xe.mk
    ERROR parsing /opt/oracle/xe/app/oracle/product/10.2.0/server/rdbms/demo/demo_xe.mk: Unable to determine what to link with.

Maybe you are looking for

  • Can not capture from Sony HDV 1080i (recording in 60i)

    Hello We are trying to capture from the above camera to a Mac Dual G5. We are using FinalCutPro 5.1.2. We are using a FireWire 400 cable to connect to the front of the computer (have also tryed back of Cinema Display). The footage was captured in HDV

  • Itunes (6.0.5) could not back up my Ipone 5 (6.1.4) because an error occurred.  How can I get this to update?

    I had to order a replacement Verizon iphone5 because my bluetooth stopped working and I am trying to back up my phone via USB cord before activating the new phone.  However, I get a generic error that Itunes can't back up my phone because of an error

  • CFolders System for Business Package Buyers

    I am very new in KM and cFolders area. Currently we have already installed EP+EPC on Netweaver04s and trying to apply business package Buyers. The installation guide of Business package said that we need to have SM59 RFC connection to cFolder system.

  • Wrong figures in XL reporter

    Hi, My sales and purchase register are showing wrong figures. It is showing double quantity and price. What could be the possibility or solution? and one more thing which I have noticed is I see same location twice. where I have created only 1. What

  • MetaData Jco Connection without MsgSvr

    Hi all! I have again a problem setting up the Jco Connections for the WebDynpro tutorial. Now, I'm able to create a JcoConnection for the application data, but none for the MetaData, because the IDes, I want to connect to, is not installed with a mes