Graeme might be dealing with an 'intranet' situation that DBI has not
resolved yet (with respect to a Windows OS). This would apply to both ODBC
and Oracle DBDs. Earlier this year Jeff Urlwin made an attempt to resolve
this problem, testing on my system (Windows XP/Apache2/PERL 5.8.3) with the
focus mostly DBD-Oracle. Unfortunately my lack of expertise combined with a
lack of co-operation from our network administration foiled the attempt. To
confirm if this problem is shared by Graeme, check if the following
observations hold true:

1. No problem connecting to the remote Oracle database (e.g. SQL-Plus) as a
simple client.
2. Need to install Oracle on your own machine before you can connect to the
remote database via PERL (command-line).
3. Cannot connect to the remote database as a server (via Apache). The
server log reports an error trying to connect to the remote database, e.g.

[Mon Oct 25 08:26:39 2004] [error] [client 142.2.70.49] DBI
connect('bank.canso3','fowler',...) failed: Error while trying to retrieve
text for error ORA-12154 (DBD ERROR: OCIServerAttach) at C:/Program
Files/Rweb1.03/CGIFiles/AnalysisModules/runConditionFactor.cgi line 85,
referer: http://mar6031903/cgi-bin/buildAnalysisPage.cgi

The DBI installation is affected using PPM thusly:

ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.3/DBI.ppd 
ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.3/DBD-Oracle.ppd

...and successfully tested with respect to PERL accordingly (bogus pw):

perl -e "use DBI; my $dbh =
DBI->connect('dbi:Oracle:bank.canso3','fowler','x',{RaiseError>1,AutoCommit=
>1}); my $sth = $dbh->prepare('select unique(year) from
groundfish.gsmission_list'); $sth->execute; my @row; while (@row =
$sth->fetchrow_array) { print @row;} $dbh->disconnect;"

I include these details in case Apache 2.0.49 alone is the bottleneck for my
particular situation, but perhaps not an issue for Graeme.

>       Mark Fowler
>       Marine Fish Division
>       Bedford Inst of Oceanography
>       Dept Fisheries & Oceans
>       Dartmouth NS Canada
>       [EMAIL PROTECTED]
>


-----Original Message-----
From: Reidy, Ron [mailto:[EMAIL PROTECTED] 
Sent: November 28, 2004 11:30 PM
To: Graeme St. Clair; [EMAIL PROTECTED]
Subject: RE: Windows to Oracle


Graeme,

You must install DBD::Oracle using either CPAN or ActiveState's PPM utility
(if you're using AS Perl 5.6.0).

However, I' a little confused ...

If you are truly trying to use ODBC, why are you specifying the Oracle
driver?  Shouldn't you be connecting in an ODBC-ish manner?

If you are truly trying to use DBD::Oracle, you will need to also install
the Oracle client on the machine you are running this Perl program from
before you install DBD::Oracle.  Check all of the README* files for all the
information on installing and using DBD::Oracle.

--
Ron Reidy
Lead DBA
Array BioPharma, Inc.


-----Original Message-----
From:   Graeme St. Clair [mailto:[EMAIL PROTECTED]
Sent:   Sun 11/28/2004 7:11 PM
To:     [EMAIL PROTECTED]
Cc:     
Subject:        Windows to Oracle
Newbie, I'm afraid.  Context XP Pro, perl.apache.org's material.  All works
quite nicely talking to a skeleton MySQL d-b on the same m/c (and for that
matter another XP m/c on my home LAN).  Now I need to test my changes
against a real (and remote) Oracle d-b - the original code connected to
Oracle quite happily.  I used Control Panel > Administrative Tools > Data
Sources (ODBC) to activate (if that's the word) "Microsoft ODBC for Oracle".
 
Then on my first connection, I got "install_driver(Oracle) failed: Can't
locate loadable object for module DBD::Oracle in @INC (@INC contains:
C:/Program Files/PERL_Apache/Perl/lib C:/Program
Files/PERL_Apache/Perl/site/lib .) at (eval 6) line 3 Compilation failed in
require at (eval 6) line 3. Perhaps the  DBD::Oracle perl module hasn't been
fully installed or perhaps the capitalisation of 'Oracle' isn't right.
Available drivers: CSV, ExampleP, File ODBC, Proxy, SQLite, Mysql.".

So I went to CPAN for Oracle.pm 1.16, and put it in
...Perl/site/lib/DBD/Oracle.pm.  Then I got "install_driver(Oracle) failed:
Can't locate loadable object for module DBD::Oracle in @INC (@INC contains:
C:/Program Files/PERL_Apache/Perl/lib C:/Program
Files/PERL_Apache/Perl/site/lib .) at (eval 6) line 3 Compilation failed in
require at (eval 6) line 3. Perhaps a module that DBD::Oracle requires
hasn't been fully installed".

So I suppose I must be doing something right.  After inspecting Oracle.pm, I
obtained DynaLoader.pm and Exporter.pm, and put them in
...Perl/site/lib/*.pm.  But I'm still getting the second of the above msgs.
I'm guessing I need a few more odds and ends, but it would be nice if the
msg would have told me what they were...
 
What more do I need, and how can I debug this sort of thing if it happens
again?
 
Rgds, GStC.
 




This electronic message transmission is a PRIVATE communication which
contains information which may be confidential or privileged. The
information is intended 
to be for the use of the individual or entity named above. If you are not
the 
intended recipient, please be aware that any disclosure, copying,
distribution 
or use of the contents of this information is prohibited. Please notify the
sender  of the delivery error by replying to this message, or notify us by
telephone (877-633-2436, ext. 0), and then delete it from your system.

Reply via email to