Re: DBD::Oracle 1.19 fails to find Oracle version, problem and solution
- From: scoles@xxxxxxxxxxx (John Scoles)
- Date: Thu, 27 Sep 2007 10:44:10 -0400
Yes it is a rather delicate subject as if we make it work for one it will break for everyone else.
The real root of the problem is that Oracle in its divine wisdom has compacted all the .so files into one so there is no way you c compiler can get them but of SQL on the Ubuntu Server it could be the case that the Makefile fort 1.19 is not recognizing it as a Linux server or alike. We could try to debug it but I would need access to your server for an hour or so or if you have the time we can debug it together as I can send you a Makefile.PL with a little more debugging into? I have time tomorrow if you are interested Martin
Martin J. Evans wrote:
Hi,.
Just attempted to install DBD::Oracle 1.19 on an Ubuntu Server 7.04 Feisty machine running Perl v5.8.8 (and instant client 10.2.0.3-20061115) and hit a problem with the Makefile.PL not being able to determine my Oracle version. The symptom is:
==========
WARNING: Setting ORACLE_HOME env var to /home/XXX/instantclient_10_2/ for you.
WARNING: The tests will probably fail unless you set ORACLE_HOME yourself!
Using Oracle in /home/XXX/instantclient_10_2/
Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
<warnings here>
I'm having trouble finding your Oracle version number... trying harder
WARNING: I could not determine Oracle client version so I'll just
default to version 8.0.0.0. Some features of DBD::Oracle may not work.
Oracle version based logic in Makefile.PL may produce erroneous results.
You can use "perl Makefile.PL -V X.Y.Z" to specify a your client version.
Oracle version 8.0.0.0 (8.0)
Looks like an Instant Client installation, okay
==========
The real problem is that if you set ORACLE_HOME (which Makefile.PL does) sqlplus does not work e.g.,
# echo $ORACLE_HOME
# ./instantclient_10_2/sqlplus -S /nolog \@/tmp/x.sql 2>&1
DEFINE _SQLPLUS_RELEASE = "1002000300" (CHAR)
# ORACLE_HOME=/home/XXX/instantclient_10_2/ ./instantclient_10_2/sqlplus -S /nolog \@/tmp/x.sql 2>&1
Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
Contrary to the SP2-0750 error and description, Oracle's advice (on their web page) for using InstantClient is NOT to set ORACLE_HOME but to set LD_LIBRARY_PATH (or configure the dynamic linker using ldconfig etc). I can't remember now exactly what the issue was but I've had other problems using instant client with ORACLE_HOME set before. I don't think DBD::Oracle's Makefile.PL should set ORACLE_HOME if it detects instant client however, it is so ingrained in the Makefile.PL it might compromise some other installation path to remove it. As a workaround (I know not pretty) I changed Makefile.PL in get_client_version() around line 1473 as follows:
open FH, ">define.sql" or warn "Can't create define.sql: $!";
print FH "DEFINE _SQLPLUS_RELEASE\nQUIT\n";
close FH;
my $sqlplus_release = `$sqlplus_exe -S /nolog \@define.sql 2>&1`;
# +MJE
if ($sqlplus_release =~ /SP2-0750/) {
my $x = $ENV{ORACLE_HOME};
delete $ENV{ORACLE_HOME};
$sqlplus_release = `$sqlplus_exe -S /nolog \@define.sql 2>&1`;
$ENV{ORACLE_HOME} = $x;
}
# -MJE
unlink "define.sql";
Originally, I just deleted ORACLE_HOME but it is used all over the place later and led to use of uninitialised variable warnings.
Once change made the outcome is:
==========
WARNING: Setting ORACLE_HOME env var to /home/XXX/instantclient_10_2/ for you.
WARNING: The tests will probably fail unless you set ORACLE_HOME yourself!
Using Oracle in /home/XXX/instantclient_10_2/
DEFINE _SQLPLUS_RELEASE = "1002000300" (CHAR)
Oracle version 10.2.0.3 (10.2)
Looks like an Instant Client installation, okay
Your LD_LIBRARY_PATH env var is set to '/home/XXX/instantclient_10_2/'
==========
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
- Follow-Ups:
- Re: DBD::Oracle 1.19 fails to find Oracle version, problem and solution
- From: Martin Evans
- Re: DBD::Oracle 1.19 fails to find Oracle version, problem and solution
- References:
- DBD::Oracle 1.19 fails to find Oracle version, problem and solution
- From: Martin J. Evans
- DBD::Oracle 1.19 fails to find Oracle version, problem and solution
- Prev by Date: DBD::Oracle 1.19 fails to find Oracle version, problem and solution
- Next by Date: Re: int8 Informix and 64bit perl
- Previous by thread: DBD::Oracle 1.19 fails to find Oracle version, problem and solution
- Next by thread: Re: DBD::Oracle 1.19 fails to find Oracle version, problem and solution
- Index(es):
Relevant Pages
|