Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

dbd::oracle HELP

by westy032001 (Novice)
on Oct 19, 2009 at 16:52 UTC ( [id://802031]=perlquestion: print w/replies, xml ) Need Help??

westy032001 has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks Please help me I'm going mental.

I am trying to connect to oracle using :- DBD::Oracle 1.19
DBI 1.609
perl5 (revision 5 version 8 subversion 4)
Compile-time options: USE_64_BIT_INT USE_LARGE_FILES
on Solaris 10 Sparc 64bit

The above are pre-installed on the Sun installation.
I have my env variables set correctly and i can connect to the database ok via sqlplus on this unix workstation, but, with my LD_LIBRARY_PATH set to include both lib and lib32 directory's in the oracle client install i get the following errors.
$ ./oracle_connect.pl install_driver(Oracle) failed: Unable to get DBI state from DBI::_dbistate at ad778. DBI not loaded. at /usr/perl5/5.8.4/lib/sun4-solaris-64int/DynaLoader.pm line 253.
Compilation failed in require at (eval 3) line 3.
at ./oracle_connect.pl line 17
any guidance would be much appreciated.
cheers Nick.

Replies are listed 'Best First'.
Re: dbd::oracle HELP
by Anonymous Monk on Oct 19, 2009 at 17:36 UTC
    This very humble monk would suggest you start by verifying that you have the DBI and DBD you need loaded properly. Something like
    #!/usr/bin/perl use DBI; print qq{Available drivers: }. join(", ",&DBI::available_drivers()). qq{\n};

    should return something like this: note Oracle appears alive and well in the list.

    Available drivers: DBM, ExampleP, File, Gofer, Oracle, Proxy, Sponge

    But what do I know, I'm not even an initiate yet. However I'm learning, thanks to the Monastery.

      Hello Thanks for your response, every input is welcome. The available drivers look ok and include the Oracle one. cheers Nick.
Re: dbd::oracle HELP
by mje (Curate) on Oct 20, 2009 at 07:21 UTC

    How is your perl binary compiled? 32-bit or 64-bit? perl -V output will show that. Are you using the same compiler to compile DBI and DBD::Oracle that was used to compile perl?

      Hi thanks for your response. From Perl -V Compile-time options: USE_64_BIT_INT USE_LARGE_FILES so I guess that it is 64 bit ? The DBI and Oracle DBD were pre-installed on this solaris unix machine (I work for a large automotive company ) I'm not sure how they were compiled . cheers Nick

        I'm not sure USE_64_BIT_INT is the correct way to tell your binary was compiled 64bit as I'm fairly sure you can have 64bit ints (long long) and large files on 32bit builds of Perl. Under Compiler look for ptrsize=N or locate Oracle.so (in your perl tree - which is DBD::Oracle) and run file on it.

        Can we see the perl you running which generates the error.

Re: dbd::oracle HELP
by jbosh (Initiate) on Jan 06, 2010 at 18:20 UTC
    Has anyone found a workable solution for this problem? I'm having a similar error:

    install_driver(Oracle) failed: Unable to get DBI state from DBI::_dbistate at f1344. DBI not loaded. at /usr/perl5/5.8.4/lib/sun4-solaris-64int/DynaLoader.pm line 253.

    I verified that my Perl binaries and DBI and Oracle DBD libraries were all compiled for 32 bit.

    /usr/bin/perl: ELF 32-bit MSB executable SPARC Version 1, dynamically +linked, stripped

    DBI.so: ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically linked +, not stripped

    Oracle.so: ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically lin +ked, not stripped
      FYI - for anyone having this problem - rebuilding the perl binaries seemed to fix my problem.
        What fixed it for me was installing DBD::Oracle after DBI using cpan.

        E.g.
        cpan> install DBI
        stuff.... OK
        cpan> force install DBD::Oracle

        Need to use force because it will attempt to connect to a generic database... Karl

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://802031]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-04-26 09:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found