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

D

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.
 
J

J. Gleixner

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
 
D

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.
 
D

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

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

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,785
Latest member
undedgini

Latest Threads

Top