Had to give you a 100% answer to this but the good thing (at least to me
:-) ) is it not really a DBD::Oracle issue.
Looking at your env it seems your db is 64 bit in that case
DBD::Oracle is most likely compiled and running with the 32 client
someplace other than
ORACLE_HOME=/app/oracle/product/10.2.0/enterprise64bit
and Oracle cannot find the NLSdata files it was compiled against.
This is just a shot in the dark.
you might want to unset NLS_LANG and then set it from within your perl
script so it is the same value as the DB. When you do not set
NLS_LANG is simply uses the DBs default with might work here as well.
cheers
John Scoles
[EMAIL PROTECTED] wrote:
Hello
I do not understand why I encounter this error :
ORA-12705 : Cannot access NLS data files or invalid environment
specified
My env is :
ORACLE_BASE=/app/oracle
ORACLE_HOME=/app/oracle/product/10.2.0/enterprise64bit
ORACLE_SID=sidtest
NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252
PATH=$PATH:$ORACLE_HOME/bin
LD_LIBRARY_PATH=/app/oracle/product/10.2.0/enterprise64bit/lib
export ORACLE_BASE ORACLE_HOME ORACLE_SID NLS_LANG PATH
LD_LIBRARY_PATH
My Perl script is :
use DBI;
my $dbh = DBI->connect( 'dbi:Oracle:sidtest', 'test', 'test', {
RaiseError => 1, AutoCommit => 0 } );
print $dbh->selectrow_array(qq{ SELECT 'Hello World from
DBI/DBD::Oracle' FROM DUAL }),"\n";
$dbh->disconnect();
When I execute it, it fails with this error
DBI connect('sidtest','test',...) failed: ORA-12705: Cannot access NLS
data files or invalid environment specified (DBD ERROR: OCISessionBegin)
at test2.pl line 3
If I unset NLS_LANG it works fine. Why setting NLS_LANG disturbs the
script ?
"Oracle strongly recommends that you set the NLS_LANG on the client "
when you read this link :
http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20fa
q.htm#_Toc110410548
My Perl config is : perl 5.8.8 on Solaris 10 with DBI 1.58 and
DBD::Oracle 1.19
Thanks for your explanation
Regards
Pascal