I'm using Perl 5.8.4 on Debian 3.1 with DBI version 1.46 and DBD::Oracle 1.17, built on top of an Oracle 9.2.0.1.0 client.
I'm unable to change NLS settings via the environment or via an "ALTER SESSION" command. They are defaulting to American. The following script shows both techniques failing:
This produces the output
I've got nowhere with google or searching these forums. Has anyone met this before or got a fix?
Thanks in advance,
fish
["]As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.["]
--Maur
I'm unable to change NLS settings via the environment or via an "ALTER SESSION" command. They are defaulting to American. The following script shows both techniques failing:
Code:
#!/usr/bin/perl
use strict;
use DBI;
my $pass = '828state';
my $user = 'isil';
my $ora = '/usr/oracle/product/9.2.0.1.0';
$ENV{ORACLE_SID}='ORA0';
$ENV{ORACLE_HOME}=$ora;
$ENV{ORACLE_BASE}=$ora;
$ENV{LD_LIBRARY_PATH}=$ora . '/lib';
$ENV{ORA_NLS33}=$ora . '/ocommon/nls/admin/data';
$ENV{NLS_LANG}='ENGLISH';
$ENV{NLS_LANGUAGE}='ENGLISH';
$ENV{NLS_TERRITORY}='UNITED KINGDOM';
$ENV{NLS_DATE_LANGUAGE}='ENGLISH';
$ENV{NLS_DATE_FORMAT}='MM/DD/YYYY';
my $dbh = DBI->connect( 'dbi:Oracle:host=oracle;sid=ORA0;port=1521',
$user, $pass, { RaiseError => 1, AutoCommit => 0 }
);
$dbh->do("ALTER SESSION SET NLS_LANGUAGE = 'ENGLISH'");
my $nls = $dbh->selectall_arrayref( q{
SELECT * from NLS_DATABASE_PARAMETERS
} );
foreach (@$nls) {
my ($parm,$val) = @$_;
print "$parm -> $val\n" if $parm eq 'NLS_LANGUAGE';
}
This produces the output
Code:
NLS_LANGUAGE -> AMERICAN
Issuing rollback() for database handle being DESTROY'd without explicit disconnect().
I've got nowhere with google or searching these forums. Has anyone met this before or got a fix?
Thanks in advance,
fish
["]As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.["]
--Maur