Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries



Links

Issociate
Impressum

#1: Not able to connect to oracle db using DBI ( Activestate )

Posted on 2005-04-08 15:02:49 by debhatta

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.

Report this message

Mr Ad

Google

#2: Re: Not able to connect to oracle db using DBI ( Activestate )

Posted on 2005-04-08 15:59:31 by mothra

Hello,

wrote in message
news:1112965369.409586.252140@f14g2000cwb.googlegroups.com.. .
> 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:/PPMS erver:
DBD-Oracle [1.12] Oracle database driver for the DBI module

I hope this helps

Mothra

Report this message

#3: Re: Not able to connect to oracle db using DBI ( Activestate )

Posted on 2005-04-08 16:00:42 by Dave Peacock

> debhatta@hotmail.com wrote:



> 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

I would hazard a guess that the DBD::Oracle module isn't installed.

> 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?

DBI is just part of the equation. You're on the right track.

> Following are some of the modules installed here:
>
> ppm> query *D*



FX:

I don't see DBD::Oracle in that list. You need to install it.

You're confusion comes from the fact that DBI is a generic interface
for the DBD's. You also need to install which ever driver you need
for the databases you'll be accessing.

--
Dave Peacock - dave@sackheads.org

Report this message

#4: Re: Not able to connect to oracle db using DBI ( Activestate )

Posted on 2005-04-08 17:40:12 by glex_nospam

debhatta@hotmail.com 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

Report this message

#5: Re: Not able to connect to oracle db using DBI ( Activestate )

Posted on 2005-04-09 09:10:04 by debhatta

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.

Report this message

#6: Re: Not able to connect to oracle db using DBI ( Activestate )

Posted on 2005-04-09 09:32:54 by debhatta

Also ,

ppm> install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.3/DBD-Oracle.ppd
Error: Failed to download URL
ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.3/DBD-Or
acle.ppd: 500 LWP::Protocol::MyFTP: connect: Unknown error

ppm> install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.2/DBD-Oracle.ppd
Error: Failed to download URL
ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.2/DBD-Or
acle.ppd: 500 LWP::Protocol::MyFTP: connect: Unknown error
ppm>

Can someone give me the correct link ?

Report this message

#7: Re: Not able to connect to oracle db using DBI ( Activestate )

Posted on 2005-04-11 06:43:03 by debhatta

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/ActivePe rl/lib/CPAN.html.

If you are using Windows, an easy workaround might be to use DBD-ODBC
instead

Report this message