Skip to content
Advertisement

Multiple Oracle versions using Perl

Have one system monitoring two Oracle Databases with different versions

12.1 and 10.1

Oracle client, sdk, sqlplus installed for each and I can query either 12.1 db or 10.1 by setting theses after setting appropriate values for

export LD_LIBRARY_PATH=
export PATH=
export ORACLE_BASE=
export ORACLE_HOME=
export TNS_ADMIN=`

But Perl does not seem to pick up the the different versions. I get:

CRITICAL - cannot connect to 10.16.183.98:1521/CV. ORA-03134: Connections to this server version are no longer supported. (DBD ERROR: OCISessionBegin)

Indicating it is using only the 12.1 to try and connect to 10.1. What’s the best method to be able to query two different Oracle Database Versions from Perl?

Advertisement

Answer

As you are trying to control this via Environment Variables, I will assume that you don’t need to talk to both databases within the same program.

If I recall correctly, DBD::Oracle needs to be built against the specific Oracle client you intend to use it with. As such, you may wish compile up two different versions of the library into separate directories and use lib to point to the specific one you wish to use.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement