System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Perl 5.8.9 DBI/DBD::Oracle make test error

Yeow Yiew Choong
Occasional Visitor

Perl 5.8.9 DBI/DBD::Oracle make test error

I have HP-UX 11.11(64bit PA-RISC) and Perl 5.8.9.(32bit & 64bit)
The Perl I installed from depot file from www.develooper.com. I am using gcc 3.4.3 depot file from ftp.thewrittenword.com.
I am new to Perl. I want to install DBD::Oracle 1.24 (from CPAN) so that I can connect to remote database Oracle 10g.
I am using Oracle Instantclient 10.2 (32bit) from Oracle download.

DBI is included in the perl 5.8.9.
There is no issue on DBD compilation and make, the problem I have is when I run make test.

The error is:
# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01base................# Test loading DBI, DBD::Oracle and version
t/01base................ok
t/10general.............DBI connect('','scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=zmy12sora02)(PORT=1521))(CONNECT_DATA=(SID=CGISSRND)))',...) failed: ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc. at t/10general.t line 35
Bailout called. Further testing stopped: Unable to connect to Oracle (ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc.)
*** Error exit code 1

I can connect to Oracle using sqlplus manually.
DBD make test failed to connect to Oracle.
I have set ORACLE_HOME, LD_LIBRARY_PATH & SHLIB_PATH to my Oracle Instantclient folder at /opt/instantclient_10_2. I have changed t/10general.t under DBD setup folder to include the environment variables but still failed. The variables are :
$ENV{ORACLE_HOME} = '/opt/instantclient_10_2';
$ENV{NLS_LANG} = '.WE8ISO8859P15';
#$ENV{NLS_LANG} = 'en_US.UTF8';
#$ENV{NLS_LANG} = 'AMERICAN_AMERICA.UTF8';
#$ENV{ORACLE_USERID} = 'scott/tiger';
$ENV{ORACLE_SID} = 'CGISSRND';
$ENV{LD_LIBRARY_PATH} = '/opt/instantclient_10_2';
$ENV{SHLIB_PATH} = '/opt/instantclient_10_2';
$ENV{LD_RUN_PATH} = '/opt/instantclient_10_2';
$ENV{TNS_ADMIN} = '/opt/instantclient_10_2/network/admin';
$ENV{LD_PRELOAD} = '/opt/java1.5/jre/lib/PA_RISC2.0/libjava.sl';
#$ENV{TWO_TASK} = 'zmy12sora02';

I manually set $dbh as listed below:

my $dbh = DBI->connect('dbi:Oracle:', q{scott/tiger@(DESCRIPTION=(ADDRESS=(PROTO
COL=TCP)(HOST=zmy12sora02)(PORT=1521))(CONNECT_DATA=(SID=CGISSRND)))}, "");

I can ping my server's IP address.
I tried different variable settings that I can find from other threads in Internet but failed.
I attach original t/10general.t file 10general.t.orig.
Please help. Thanks.
3 REPLIES
Steve Post
Trusted Contributor

Re: Perl 5.8.9 DBI/DBD::Oracle make test error

Just a guess, but perhaps there is a test configuration file in the installation directory of the new module. It may be that all your environment settings are ignored, because it is using the environment in this test file.

...or maybe the environment it embedded into the module. Try setting the environment up correctly, then run the perl ./Makefile.pl process again.

I am using advice from the installation of Sybperl (the sybase interface to perl).
Yeow Yiew Choong
Occasional Visitor

Re: Perl 5.8.9 DBI/DBD::Oracle make test error

Please let me know what environment variables and the values to set. I have tried my setting but still no luck.
Thanks.
Yeow Yiew Choong
Occasional Visitor

Re: Perl 5.8.9 DBI/DBD::Oracle make test error

My Oracle database is using American English. Can anyone tell me what should I set for NLS_LANG and NLS_CHAR environment variables? Any NLS settings other than this two?
Thanks.