RE: Compiling Multiple versions of DBD::Oracle



JK,

I have faced this very problem. I solved this as follows:

1. Compile DBD::Oracle using the $ORACLE_HOME of the highest installed version of Oracle.
2. Add an entry to /etc/oratab: dbi-home:/path/to/latest/oracle/install:N
3. Ensure this ORACLE_HOME's environment variables are set prior to a perl Program's start
4. In the connection string (DBI->connect), ensure you reference the correct ORACLE_SID or set TWO_TASK before starting.

This is not necessarily the optimal way to do things (you will always be running over SQL*Net), but it works well for me.

-----------------
Ron Reidy
Lead DBA
Array BioPharma, Inc.


-----Original Message-----
From: knodel@xxxxxxxxxx [mailto:knodel@xxxxxxxxxx]
Sent: Thursday, May 26, 2005 2:36 PM
To: dbi-users@xxxxxxxx
Subject: Compiling Multiple versions of DBD::Oracle


I am sorry if this is covered somewhere that I have been unable to find
it. I have not been able to connect to the FAQ at
http://dev.isystek.com/dbi/fom.cgi. The only faq's I have found on-line
are dated CY2000, and do not appear to address this issue.

I am a UNIX admin, supporting a large Solaris Environment.

I need to compile a set of DBI/DBD::Oracle modules such that they are able
to access several different versions of Oracle databases, not all of which
might exist locally on each machine.

I originally assumed that compiling DBD::Oracle under the 'highest
revision' oracle environment would be backward compatible, but the
README.client seems to suggest that the ORACLE_HOME of the perl program's
environment should be the same as what was used at DBD::Oracle Compile
time.

This tends to suggest that I need a different DBD::Oracle for each Oracle
Revision, however there does not seem to be a mechanism within DBI to
specify *which* DBD::Oracle driver to use.

A previous email in this list said there was a connectivity matrix, but
did not give a reference to where that exists. (ref:
http://www.mail-archive.com/dbi-users@xxxxxxxx/msg23511.html) This tends
to suggest that I might find one version that is 'most likely' to work
across different versions.

Or am I completely wrong-headed, and setting ORACLE_HOME and
LD_LIBRARY_PATH allow the correct Oracle libraries to be found
irrespective of the environment in which DBD::Oracle was compiled?)

I am looking for the proper solution, not one that I might get to work
now, but must re-architect for the next Oracle version installed. What is
the way that DBI/DBD::Oracle should be configured when multiple Oracle
versions are involved?

To further complicate things, I am working under the restriction that I
may not have a C compiler in my production environments, so the solution
needs to be able to be built in development, then promoted to a c-less
production environment.

The Versions I am using:
Perl 5.8.0
DBI DBI-1.48
DBD::Oracle DBD-Oracle-1.16
Oracle 8.1.7.[3,4] 9.2.0.[3,4,6] 10.1.0.2 (etc)
GCC 2.95.3 20010315

Thanks for your attention
jk


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