RE: DBD-Oracle and Oracle versions



On Windows, the Oracle client library keeps the same name between versions;
it's oci.dll.
The functions and data structures are also generally compatible between
versions, and runtime linking with DLLs on Windows is all done by the name
of the exported function; there's no need to worry about whether it's at a
different offset in the library.

So if you compile and link an application (including DBD::Oracle) against
Oracle 8i, it will be able to link at runtime against 8i, 9i or 10g Oracle
client libraries.

It's even possible to compile against a 10g client and then at runtime use a
9i or 8i client library, provided you only use OCI functions in the lowest
version; e.g. if you use OCILobRead2 then it'll fail against a 9i client as
that function doesn't exist there.

More recently, the PPM version (optionally?) bundles Oracle Instant Client
10g with the distribution, so it effectively installs the Oracle client it
was compiled against in the first place.

On Unix, the shared library changes names between versions, e.g.
libclntsh.so.9.0, libclntsh.so.10.1.
There is a symlink libclntsh.so in each version, but DBD::Oracle appears to
link to the library including the major version number, so this change of
name breaks compatibility right off when changing the client. I don't know
enough about runtime linking on Unix to say for sure whether there are other
issues, although I can see that against 10g it links against another library
(libnz10.so) that doesn't even appear to have an equivalent in 9i.

I wonder if it is possible to link DBD::Oracle against the "libclntsh.so"
symlink?

It's still best practice to compile DBD::Oracle against the same client
it'll be using at runtime.

-----Original Message-----
From: Capacio, Paula J [mailto:PCAPACIO@xxxxxxxxx]
Sent: 19 December 2006 20:16
To: dbi-users@xxxxxxxx
Subject: DBD-Oracle and Oracle versions

From lurking around this mail list over the years,
I've seen numerous items relating to building
DBD-Oracle against a specific version of the Oracle
client software on *nix systems.

Example: if DBD-Oracle was built using version 9,
then the Oracle client is upgraded to 10g;
it is necessary to rebuild DBD-Oracle with the 10g client.

I have used Perl on HP/UNIX, AIX, Linux and Windows.
On the *nix systems, Perl came with the OS and I have
had to install the DBI and DBD-Oracle modules using
the standard make process. On windows, I used
ActiveState Active Perl and PPM to install DBI and
DBD-Oracle modules. In the windows environment I
never have to worry about which version of the Oracle
client is present and I can upgrade to a different
client version of Oracle without having to reinstall
the DBD-Oracle module.

What trick allows PPM modules to work regardless of
Oracle client versions? Ultimately, I'd like to know
if there is a way to 'make' the modules on *nix systems
so that they don't rely on a specific version?

Thanks in advance,
Paula

.



Relevant Pages

  • Microsoft Data Link Error
    ... I am getting an error in opening an ADO connection to Oracle 10g using ... solved in the past by re-installing this component of Windows. ... latest versions of the client, so we could unistall the current client ...
    (comp.databases.oracle.misc)
  • Re: Problem installing Oracle 10g client on Windows 2k3 server
    ... I have downloaded the oracle 10g for 32bit systems client and have ... tried to install it on our windows 2003 production server. ... nothing happens and the client just won't ...
    (comp.databases.oracle.server)
  • Re: Are .NET Framework 1.1 apps on Linux possible?
    ... assuming I can get the client to instead install ... > run the apps on a Windows box, will ADO.NET have any problems accessing ... > respond to the client. ... As for ADO.NET, I can't say much about working with oracle, but I hear the ...
    (microsoft.public.dotnet.framework)
  • Re: Microsoft Data Link Error
    ... I am getting an error in opening an ADO connection to Oracle 10g using ... solved in the past by re-installing this component of Windows. ... latest versions of the client, so we could unistall the current client ...
    (comp.databases.oracle.misc)
  • Re: DBD Oracle 1.20 ORA-24334 Error
    ... On the premise instant client and also tried to run perl Makefile.PL -V ... the status after having connected to Oracle ... Failed 2/33 tests, 93.94% okay ...
    (perl.dbi.users)