ORA-12705 during DBI::connect when NLS_LANG set



Hi,

Using Oracle 10.2.0.3, DBI version 1.54 and DBD::Oracle version 1.19 I am
receiving the following error during DBI::connect if the NLS_LANG
environment variable is set:

ORA-12705: Cannot access NLS data files or invalid environment specified

The output of the test script follows. Site-specific data has been
obfuscated. The test script is included at the end for reference.

oracle@gs2cdb01_> export NLS_LANG=""; ./tmp.pl
**** LOGIN SUCCEEDED:

oracle@gs2cdb01_> export NLS_LANG="ENGLISH_UNITED KINGDOM.UTF8"; ./tmp.pl
DBI connect('host=X;port=1521;sid=X','X',...) failed: ORA-12705: Cannot
access NLS data files or invalid environment specified (DBD ERROR:
OCISessionBegin) at ./tmp.pl line 5
**** LOGIN FAILED: ENGLISH_UNITED KINGDOM.UTF8

Other relevant environment variables are:

HOME="/export/home/oracle"
LD_LIBRARY_PATH="/opt/oracle/product/10.2.0.3/lib:/usr/openwin/lib:/usr/
local/lib:/usr/lib/lwp/64"
ORACLE_HOME="/opt/oracle/product/10.2.0.3"
ORACLE_SID="X"
PATH="/opt/oracle/product/10.2.0.3/bin:/usr/bin::/usr/ccs/bin:/usr/
openwin/bin:/usr/dt/bin:/usr/sbin:/usr/platform/SUNW,Sun-Fire/sbin:/etc/
vx/bin:/opt/VRTS/bin:/etc/vx/bin:/opt/VRTSob/bin:/opt/VRTSvlic/bin:/opt/
VRTSvcs/bin:/opt/VRTSllt:/opt/VRTSvxfs/sbin:/usr/sfw/bin:/usr/local/bin:/
usr/local/sbin:/opt/SUNWexplo/bin:/opt/CTEact/bin:/usr/local/bin"

Has anyone else experienced this error when connecting to Oracle using
DBI with NLS_LANG set?

If not, is anyone able to make any suggestions as to how I can further
debug this problem?

With thanks,

Ollie



#!/usr/local/bin/perl -Tw
use strict;
use DBI;

my $dbh = DBI->connect("dbi:Oracle:host=X;port=1521;sid=X",
'X',
'X',
{ RaiseError => 0,
AutoCommit => 0});
defined($dbh) && printf("**** LOGIN SUCCEEDED: %s\n", $ENV{'NLS_LANG'});
!defined($dbh) && printf("**** LOGIN FAILED: %s\n", $ENV{'NLS_LANG'});
.