RE: Connect failure: OCIEnvNlsCreate (check ORACLE_HOME and NLS settings etc.)
am 25.08.2005 16:57:02 von Ron.ReidyVictor,
I believe this is a permissions issue. There was a posting to this =
group a few months ago that was very similar in nature. Look around the =
archives for it.
-----------------
Ron Reidy
Lead DBA
Array BioPharma, Inc.
-----Original Message-----
From: Victor Churchill [mailto:victor@qonnectis.com]
Sent: Thursday, August 25, 2005 8:17 AM
To: dbi-users@perl.org
Subject: Connect failure: OCIEnvNlsCreate (check ORACLE_HOME and NLS
settings etc.)=20
Hello all,
I've searched and found a few references to the above error, but none=20
that seems to suit my situation. I wonder if anyone here may have an=20
idea of what I should look for next...
I have a pretty straightforward setup (I hope!):
Database server on box "DB" :
Oracle Database 10g Release 10.1.0.3.0 - 64bit Production
Red Hat Enterprise Linux ES release 3 (Taroon Update 5), kernel=20
2.4.21-27.elsmp
Web server on box "WS" :
Perl 5.8.0
Apache 2.0.46
mod_perl is configured into the Apache by default but I am NOT using it
Oracle Instant Client 10.2
Red Hat Enterprise Linux ES release 3 (Taroon Update 5), kernel=20
2.4.21-23.elsmp
Also a development system on box "Dev":
perl 5.8.0
Oracle 8.1.7
Red Hat Fedora Core 3, kernel 2.4.18-11smp
Oracle Instant Client on WS has been set up following the 'recipe' (Tim=20
Barrass, 2/17/05 in this group). WS has a copy of tnsnames.ora=20
identifying both DB and Dev services.
WS Instant Client can connect to databases on DB and on Dev using=20
sqlplus from command-line.
As a check, Dev can connect to DB using sqlplus from command-line.
Here's the odd thing...
With a test script run from the command line, WS can connect to DB or to =
Dev using DBD::Oracle.
From a CGI perl script it can't. Instead I see the dreaded=20
OCIEnvNlsCreate (check ORACLE_HOME and NLS settings etc.)
Both the manual test script (which works) and the CGI script (that=20
doesn't) make use of the same environment-setting comands, imported from =
a "require"d file:
package dbProperties;
require Exporter;
@ISA=3Dqw(Exporter);
@EXPORT =3D qw ( $ENV{'PATH'}
$ENV{'ORACLE_HOME'}
$ENV{'LD_LIBRARY_PATH'}
$ENV{'SQLPATH'}
$ENV{'TNS_ADMIN'}
$ENV{'PERL5LIB'}
$ENV{'NLS_LANG'}
$dsn $dbuser $dbpassword
$appIP $LXASIP $DDSIP );
#### Oracle Environment and variable assignments
$ENV{'PATH'} =
'/usr/local/OraClient/instantclient_10_2/bin:/usr/kerberos/b in:/usr/local=
/bin:/bin:/usr/bin:/usr/X11R6/bin';
$ENV{'ORACLE_HOME'} =3D '/usr/local/OraClient/instantclient_10_2';
$ENV{'LD_LIBRARY_PATH'} =3D =
'/usr/local/OraClient/instantclient_10_2/lib';
$ENV{'SQLPATH'} =3D =
'/usr/local/OraClient/instantclient_10_2/bin';
$ENV{'TNS_ADMIN'} =3D '/usr/local/OraClient';
$ENV{'PERL5LIB'} =
'/usr/local/OraClient/instantclient_10_2/perl-modules/lib/pe rl5/site_perl=
/5.8.0/i386-linux-thread-multi';
$ENV{'NLS_LANG'} =3D 'AMERICAN_AMERICA.UTF8';# '',=20
'WE8ISO8859P1','ENGLISH','AL32UTF8' also tried...;
$dsn =3D q{dbi:Oracle:QQ3_VLAN} ;
($dbuser,$dbpassword) =3D ("foo","foo");
Putting a print into the CGI script, and running 'env' on the command=20
line, shows that the two connection-attempots both have the same values=20
for these environment variables:
PERL5LIB=3D/usr/local/OraClient/instantclient_10_2/perl-modu les/lib/perl5=
/site_perl/5.8.0/i386-linux-thread-multi
LD_LIBRARY_PATH=3D/usr/local/OraClient/instantclient_10_2/li b:
TNS_ADMIN=3D/usr/local/OraClient
PATH=3D/usr/local/OraClient/instantclient_10_2/bin:/usr/kerb eros/bin:/bin=
:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/q g/bin
LANG=3Den_US.UTF-8
SQLPATH=3D/usr/local/OraClient/instantclient_10_2/bin
ORACLE_HOME=3D/usr/local/OraClient/instantclient_10_2
It's obvious that I'm still missing something. It's not obvious to me=20
what that is. Can anyone suggest what I should look for next?
Thanks,
victor churchill
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.