DBD-Oracle and Oracle versions

DBD-Oracle and Oracle versions

am 19.12.2006 21:15:56 von pcapacio

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

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

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=20
the standard make process. On windows, I used=20
ActiveState Active Perl and PPM to install DBI and=20
DBD-Oracle modules. In the windows environment I=20
never have to worry about which version of the Oracle
client is present and I can upgrade to a different=20
client version of Oracle without having to reinstall=20
the DBD-Oracle module. =20

What trick allows PPM modules to work regardless of=20
Oracle client versions? Ultimately, I'd like to know=20
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

RE: DBD-Oracle and Oracle versions

am 19.12.2006 22:17:21 von Ron.Reidy

Paula,

Unless you are keeping the older versions of Oracle on the system, I
would definitely rebuild both DBD::Oracle and DBI when moving to a new
client.

I'm not a Windows guy, but if you install DBD::Oracle under a 9.2 client
and then remove that client, replacing it with a 10.2 client, doesn't
the DBD::Oracle stop working?

Just my $0.02 worth.

--
Ron Reidy
Lead DBA
Array BioPharma, Inc.

-----Original Message-----
From: Capacio, Paula J [mailto:PCAPACIO@amfam.com]=20
Sent: Tuesday, December 19, 2006 1:16 PM
To: dbi-users@perl.org
Subject: DBD-Oracle and Oracle versions

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

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

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=20
the standard make process. On windows, I used=20
ActiveState Active Perl and PPM to install DBI and=20
DBD-Oracle modules. In the windows environment I=20
never have to worry about which version of the Oracle
client is present and I can upgrade to a different=20
client version of Oracle without having to reinstall=20
the DBD-Oracle module. =20

What trick allows PPM modules to work regardless of=20
Oracle client versions? Ultimately, I'd like to know=20
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

This electronic message transmission is a PRIVATE communication which =
contains
information which may be confidential or privileged. The information is =
intended=20
to be for the use of the individual or entity named above. If you are =
not the=20
intended recipient, please be aware that any disclosure, copying, =
distribution=20
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.

Re: DBD-Oracle and Oracle versions

am 20.12.2006 13:00:46 von scoles

""Capacio, Paula J"" wrote in message
news:A787F31512A25E4F9782045CFE320C800F894CF3@NHQ1ACCOEX05VS 1.corporate.amfam.com...
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.

Natrue of the beast. DBD::Oracle uses OIC which is part of the Oracle
client so you change you client you have to rebuild your DBD::Oracle

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.

Well you could keep you 9 client and still connect to 10g with it. The DB
would not care that much. You might miss out on any new features that 10g
introduced though.

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.

Well what happens here is that Active State does the DBD::Oracle compile
perl for you and you just down load the whole thing, compiled code Oracle
client and perl code and then it points you perl to it. In this case your
DDB::Oracle is still using the versioin of the client it was compiled with
so you might have see some isuese say if you were using bulk inserts with
the array interface. Lets say a million records, You may have ActiveState
DBD:Oracle 1.17 installed this operation would take at least half a hour
plus. If you recompiled your DBD::Oracle to 1.18 or later this operation may
only take a few mins.


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?

We would have to percompile and bundle the binaries with the PPM one PPM for
each version of the Oracle client. One however runs into problems with
copyright. Oracle has only given public redistribution permission for the
10g instantclient binarys not its other client products.

hope this clears a few things up.

Thanks in advance,
Paula

RE: DBD-Oracle and Oracle versions

am 20.12.2006 16:06:51 von Andy

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@amfam.com]
Sent: 19 December 2006 20:16
To: dbi-users@perl.org
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