Not able to connect to oracle db using DBI ( Activestate )

Discussion in 'Perl Misc' started by debhatta@hotmail.com, Apr 8, 2005.

  1. Guest

    Hi all,

    I have a script like :

    use strict;
    use DBI;
    my $con;
    $con = DBI->connect("dbi:Oracle:hrdrel","hr","hr") or die "It cannot be
    done";

    When I am running it the error is :

    install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC
    contain
    : D:/Perl/lib D:/Perl/site/lib .) at (eval 1) line 3.
    Perhaps the DBD::Oracle perl module hasn't been fully installed,
    or perhaps the capitalisation of 'Oracle' isn't right.
    Available drivers: ADO, Chart, DBM, ExampleP, File, ODBC, Proxy,
    Sponge.
    at example.pl line 7

    Now I am using Activestate perl, and have installed the DBI module
    using PPM. But I am feeling that above error is due to some other
    module missing. Can anyone kindly guide me to the correct one or any
    help on the above issue?

    Following are some of the modules installed here:

    ppm> query *D*
    Querying target 1 (ActivePerl 5.8.6.811)
    1. ActivePerl-DocTools [0.04] Perl extension for Documentation TOC
    Generat~
    2. Apache-DBI [0.94] Initiate a persistent database
    connection
    3. Class-Data-Inherita~ [0.02] Inheritable, overridable class data
    4. Class-DBI [0.96] Simple Database Abstraction
    5. Class-DBI-Oracle [0.51] Extensions to Class::DBI for Oracle
    6. Data-Dump [1.06] Pretty printing of data structures
    7. DBD-ADO [2.94] A DBI driver for Microsoft ADO
    (Active Data ~
    8. DBD-Chart [0.80] DBI driver abstraction for Rendering
    Charts ~
    9. DBD-ODBC [1.11] ODBC Driver for DBI
    10. DBI [1.48] Database independent interface for
    Perl
    11. DBIx-ContextualFetch [1.02] Add contextual fetches to DBI
    12. Digest-HMAC [1.01] Keyed-Hashing for Message
    Authentication
    13. Digest-MD2 [2.03] Perl interface to the MD2 Algorithm
    14. Digest-SHA1 [2.10] Perl interface to the SHA-1 Algorithm
    15. Ima-DBI [0.33] Database connection caching and
    organization
    16. MD5 [2.03] Perl interface to the MD5 Algorithm
    (obsolet~
    ppm>

    ppm> search *oracle*
    Searching in Active Repositories
    1. Class-DBI-Oracle [0.51] Extensions to Class::DBI for Oracle
    2. DBIx-OracleLogin [0.02] takes a string and splits out individual
    login in~
    3. Oracle-Trace [1.06] Perl Module for parsing Oracle Trace files
    ppm>

    P.S - I am sorry if Activestate Perl Qustions are not to be asked in
    this forum.
    , Apr 8, 2005
    #1
    1. Advertising

  2. Mothra Guest

    Hello,

    <> wrote in message
    news:...
    > Hi all,
    >

    (snipped)

    > install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC
    > contain

    (more snippage)

    PPM interactive shell (2.1.6) - type 'help' for available commands.
    PPM> search DBD-Oracle
    ^^^^^^^^^^^^^^^^^^^^^
    Packages available from
    http://ppm.ActiveState.com/cgibin/PPM/ppmserver.pl?urn:/PPMServer:
    DBD-Oracle [1.12] Oracle database driver for the DBI module

    I hope this helps

    Mothra
    Mothra, Apr 8, 2005
    #2
    1. Advertising

  3. J. Gleixner Guest

    wrote:
    > Hi all,
    >
    > I have a script like :
    >
    > use strict;
    > use DBI;
    > my $con;
    > $con = DBI->connect("dbi:Oracle:hrdrel","hr","hr") or die "It cannot be
    > done";
    >
    > When I am running it the error is :
    >
    > install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC
    > contain
    > : D:/Perl/lib D:/Perl/site/lib .) at (eval 1) line 3.
    > Perhaps the DBD::Oracle perl module hasn't been fully installed,
    > or perhaps the capitalisation of 'Oracle' isn't right.
    > Available drivers: ADO, Chart, DBM, ExampleP, File, ODBC, Proxy,
    > Sponge.
    > at example.pl line 7
    >
    > Now I am using Activestate perl, and have installed the DBI module
    > using PPM. But I am feeling that above error is due to some other
    > module missing. Can anyone kindly guide me to the correct one or any
    > help on the above issue?


    Using a search engine, like Google, may have helped you find the answer
    to your situation much quicker.

    See ya
    J. Gleixner, Apr 8, 2005
    #3
  4. Guest

    Hi,

    Thanks for your answers, but do not know why the following is coming on
    my machine:

    ppm> search DBD-Oracle
    Searching in Active Repositories
    No matches for 'DBD-Oracle'; see 'help search'.
    ppm>

    Although someone above has indicated that he could get it.
    , Apr 9, 2005
    #4
  5. Guest

    , Apr 9, 2005
    #5
  6. Guest

    DBD-Oracle
    Unfortunately, Oracle no longer provides the Oracle client libraries
    for free. ActiveState was also explicitly forbidden by Oracle from
    distributing PPMs that dynamically link with client libraries users may
    already possess. Therefore, we can no longer provide a PPM for
    DBD-Oracle. The DBD-Oracle package for the PPM included with ActivePerl
    5.6 is still available in the ActiveState PPM repository; it is the
    last package we compiled before the licensing changed.

    If you wish to compile this module locally, the source may be obtained
    from http://www.cpan.org. For instructions on using CPAN, see
    http://aspn.activestate.com/ASPN/Reference/Products/ActivePerl/lib/CPAN.html.

    If you are using Windows, an easy workaround might be to use DBD-ODBC
    instead
    , Apr 11, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ulloa
    Replies:
    1
    Views:
    526
    Juha Laiho
    Jul 22, 2004
  2. Benson, John
    Replies:
    1
    Views:
    2,217
    Aurelio Martin
    Jan 28, 2004
  3. Pieter Claerhout
    Replies:
    0
    Views:
    600
    Pieter Claerhout
    Jan 28, 2004
  4. sed_y
    Replies:
    0
    Views:
    1,013
    sed_y
    Feb 15, 2012
  5. Tim
    Replies:
    8
    Views:
    147
    Peter J. Holzer
    Dec 15, 2007
Loading...

Share This Page