RE: Windows to Oracle

From: Mark Fowler (FowlerM_at_mar.dfo-mpo.gc.ca)
Date: 11/29/04


Date: Mon, 29 Nov 2004 10:12:41 -0400
To: "'Reidy, Ron'" <Ron.Reidy@arraybiopharma.com>, "Graeme St. Clair" <Graeme.St.Clair@hds.com>, dbi-users@perl.org

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
> fowlerm@mar.dfo-mpo.gc.ca
>

-----Original Message-----
From: Reidy, Ron [mailto:Ron.Reidy@arraybiopharma.com]
Sent: November 28, 2004 11:30 PM
To: Graeme St. Clair; dbi-users@perl.org
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:Graeme.St.Clair@hds.com]
Sent:	Sun 11/28/2004 7:11 PM
To:	dbi-users@perl.org
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.


Relevant Pages

  • Re: MSACCESS hangs
    ... Client -- Windows XP, MS Access 2003 using Oracle's ODBC driver ... I would try to isolate whether it is the query or ODBC. ... Senior Oracle Dba ... other thoughts are windows patches may have been installed, ...
    (comp.databases.oracle.server)
  • RE: Windows to Oracle
    ... You must install DBD::Oracle using either CPAN or ActiveState's PPM utility (if you're using AS Perl 5.6.0). ... If you are truly trying to use ODBC, why are you specifying the Oracle driver? ...
    (perl.dbi.users)
  • RE: Accessing oracle from windows 2000
    ... You need oracle net8 anyway for odbc so it is likely you will ... just be able to install the activestate DBD::Oracle and DBI. ... > documentation on DBI and I can't find the answers I'm looking for. ...
    (perl.dbi.users)
  • Oracle Generic Connectivity talk to SQL server with free ODBC
    ... We have Oracle 10g in HP-UX. ... pay lots of money for ODBC license fee. ... It needn't install any ODBC ... This instructs the listener that to service this sid, ...
    (comp.databases.oracle.server)
  • Re: Installing 32-bit and 64-bit oracle client on windows 2003 Server
    ... Windows services to connect to the oracle database server hosted on HP- ... if you want to install 2 different clients you need to install ... and hit the documentation button. ...
    (comp.databases.oracle.server)