Problems connecting to Oracle DB on SLES



Hi,

I have a quite annoying problem concerning the NLS_LANG parameter. If set to "german_germany.we8iso8859p1" as necessary, connecting to database fails. If NLS_LANG is not set, all runs fine, but german umlauts are, of course, not correctly displayed.

I ran the testing part as described in the README file, output follows below.

I'm thankful for every hint or suggestion on this matter.

Regards,

Thorsten

------------------------------------------------------------------------------------------------------------
Using DBI 1.59 (for perl 5.008003 on i586-linux-thread-multi) installed in /usr/lib/perl5/site_perl/5.8.3/i586-linux-thread-multi/auto/DBI/

Configuring DBD::Oracle for perl 5.008003 on linux (i586-linux-thread-multi)

Remember to actually *READ* the README file! Especially if you have any problems.

Using Oracle in /opt/oracle/product/9ir2
DEFINE _SQLPLUS_RELEASE = "902000600" (CHAR)
Oracle version 9.2.0.6 (9.2)
Found /opt/oracle/product/9ir2/rdbms/demo/demo_rdbms.mk
Using /opt/oracle/product/9ir2/rdbms/demo/demo_rdbms.mk
Your LD_LIBRARY_PATH env var is set to '/opt/oracle/product/9ir2/lib'
Reading /opt/oracle/product/9ir2/rdbms/demo/demo_rdbms.mk
Reading /opt/oracle/product/9ir2/rdbms/lib/env_rdbms.mk

Attempting to discover Oracle OCI build rules
cc -c -I/opt/oracle/product/9ir2/rdbms/demo -I/opt/oracle/product/9ir2/rdbms/public -I/opt/oracle/product/9ir2/rdbms/demo -I/opt/oracle/product/9ir2/rdbms/public -I/opt/oracle/product/9ir2/plsql/public -I/opt/oracle/product/9ir2/network/public -I/usr/lib/perl5/site_perl/5.8.3/i586-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -Wall -pipe -DVERSION=\"1.19\" -DXS_VERSION=\"1.19\" -fPIC "-I/usr/lib/perl5/5.8.3/i586-linux-thread-multi/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"9.2.0.6\" DBD_ORA_OBJ.c
by executing: [make -f /opt/oracle/product/9ir2/rdbms/demo/demo_rdbms.mk build ECHODO=echo ECHO=echo GENCLNTSH='echo genclntsh' CC=true OPTIMIZE= CCFLAGS= EXE=DBD_ORA_EXE OBJS=DBD_ORA_OBJ.o]
Oracle oci build command:
[true -L/opt/oracle/product/9ir2/lib/ -L/opt/oracle/product/9ir2/rdbms/lib/ -o DBD_ORA_EXE DBD_ORA_OBJ.o -lclntsh `cat /opt/oracle/product/9ir2/lib/sysliblist` -ldl -lm ]

Found header files in /opt/oracle/product/9ir2/rdbms/demo /opt/oracle/product/9ir2/rdbms/public.

Checking for functioning wait.ph
Scalar found where operator expected at (eval 207) line 1, near "'int' $__val"
(Missing operator before $__val?)


System: perl5.008003 linux delen 2.6.5 #1 smp wed dec 22 11:54:27 utc 2004 i686 i686 i386 gnulinux
Compiler: cc -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -Wall -pipe -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
Linker: /usr/bin/ld
Sysliblist: -ldl -lm -lpthread -lnsl -lirc
Oracle makefiles would have used these definitions but we override them:
CC: /usr/bin/gcc
CFLAGS: $(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(PFLAGS)\
$(SHARED_CFLAG) $(USRFLAGS) -fp
[$(GFLAG) -O3 $(CDEBUG) $(CCFLAGS) -I/opt/oracle/product/9ir2/rdbms/demo -I/opt/oracle/product/9ir2/rdbms/public -I/opt/oracle/product/9ir2/plsql/public -I/opt/oracle/product/9ir2/network/public -DLINUX -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -DSLTS_ENABLE -DSLMXMX_ENABLE -D_REENTRANT -DNS_THREADS $(LPFLAGS) $(USRFLAGS) -fp]
LDFLAGS: -o $@ $(LDPATHFLAG)$(PRODLIBHOME) $(LDPATHFLAG)$(LIBHOME) $(LDPATHFLAG)$(LIBHOME)stubs/
[-o $@ -L/opt/oracle/product/9ir2/rdbms/lib/ -L$(LIBHOME) -L$(LIBHOME)stubs/]
Linking with OTHERLDFLAGS = -L/opt/oracle/product/9ir2/lib/ -L/opt/oracle/product/9ir2/rdbms/lib/ -lclntsh `cat /opt/oracle/product/9ir2/lib/sysliblist` -ldl -lm [from 'build' rule]

LD_RUN_PATH=/opt/oracle/product/9ir2/lib:/opt/oracle/product/9ir2/rdbms/lib
Using DBD::Oracle 1.19.
Using DBD::Oracle 1.19.
Using DBI 1.59 (for perl 5.008003 on i586-linux-thread-multi) installed in /usr/lib/perl5/site_perl/5.8.3/i586-linux-thread-multi/auto/DBI/
Writing Makefile for DBD::Oracle

*** If you have problems...
read all the log printed above, and the README and README.help.txt files.
(Of course, you have read README by now anyway, haven't you?)

# -------------------------------------------- #

Skip blib/lib/DBD/Oracle.pm (unchanged)
Skip blib/lib/DBD/mkta.pl (unchanged)
Skip blib/lib/oraperl.ph (unchanged)
Skip blib/arch/auto/DBD/Oracle/dbdimp.h (unchanged)
Skip blib/arch/auto/DBD/Oracle/ocitrace.h (unchanged)
Skip blib/lib/Oraperl.pm (unchanged)
Skip blib/arch/auto/DBD/Oracle/Oracle.h (unchanged)
Skip blib/arch/auto/DBD/Oracle/mk.pm (unchanged)
Skip blib/lib/DBD/Oracle/GetInfo.pm (unchanged)
cc -c -I/opt/oracle/product/9ir2/rdbms/demo -I/opt/oracle/product/9ir2/rdbms/public -I/opt/oracle/product/9ir2/rdbms/demo -I/opt/oracle/product/9ir2/rdbms/public -I/opt/oracle/product/9ir2/plsql/public -I/opt/oracle/product/9ir2/network/public -I/usr/lib/perl5/site_perl/5.8.3/i586-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -Wall -pipe -DVERSION=\"1.19\" -DXS_VERSION=\"1.19\" -fPIC "-I/usr/lib/perl5/5.8.3/i586-linux-thread-multi/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"9.2.0.6\" Oracle.c
cc -c -I/opt/oracle/product/9ir2/rdbms/demo -I/opt/oracle/product/9ir2/rdbms/public -I/opt/oracle/product/9ir2/rdbms/demo -I/opt/oracle/product/9ir2/rdbms/public -I/opt/oracle/product/9ir2/plsql/public -I/opt/oracle/product/9ir2/network/public -I/usr/lib/perl5/site_perl/5.8.3/i586-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -Wall -pipe -DVERSION=\"1.19\" -DXS_VERSION=\"1.19\" -fPIC "-I/usr/lib/perl5/5.8.3/i586-linux-thread-multi/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"9.2.0.6\" dbdimp.c
cc -c -I/opt/oracle/product/9ir2/rdbms/demo -I/opt/oracle/product/9ir2/rdbms/public -I/opt/oracle/product/9ir2/rdbms/demo -I/opt/oracle/product/9ir2/rdbms/public -I/opt/oracle/product/9ir2/plsql/public -I/opt/oracle/product/9ir2/network/public -I/usr/lib/perl5/site_perl/5.8.3/i586-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -Wall -pipe -DVERSION=\"1.19\" -DXS_VERSION=\"1.19\" -fPIC "-I/usr/lib/perl5/5.8.3/i586-linux-thread-multi/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"9.2.0.6\" oci8.c
Running Mkbootstrap for DBD::Oracle ()
chmod 644 Oracle.bs
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
LD_RUN_PATH="/opt/oracle/product/9ir2/lib:/opt/oracle/product/9ir2/rdbms/lib" cc -shared Oracle.o dbdimp.o oci8.o -L/opt/oracle/product/9ir2/lib/ -L/opt/oracle/product/9ir2/rdbms/lib/ -lclntsh `cat /opt/oracle/product/9ir2/lib/sysliblist` -ldl -lm -o blib/arch/auto/DBD/Oracle/Oracle.so
chmod 755 blib/arch/auto/DBD/Oracle/Oracle.so
cp Oracle.bs blib/arch/auto/DBD/Oracle/Oracle.bs
chmod 644 blib/arch/auto/DBD/Oracle/Oracle.bs
cp ora_explain blib/script/ora_explain
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/ora_explain
Manifying blib/man1/ora_explain.1
Manifying blib/man3/DBD::Oracle.3pm
Manifying blib/man3/DBD::Oraperl.3pm

# -------------------------------------------- #

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01base................ok
t/10general.............DBI connect('','scott/tiger',...) failed: ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin) at t/10general.t line 18
Undefined subroutine &main::BAILOUT called at t/10general.t line 21.
# Looks like your test died before it could output anything.
dubious
Test returned status 255 (wstat 65280, 0xff00)
Scalar found where operator expected at (eval 153) line 1, near "'int' $__val"
(Missing operator before $__val?)
DIED. FAILED tests 1-33
Failed 33/33 tests, 0.00% okay
t/15nls.................DBI connect('','scott/tiger',...) failed: ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin) at t/15nls.t line 19
ok
9/9 skipped: Unable to connect to Oracle (ORA-00604: error occurred at recursive SQL level 1
t/20select..............Unable to connect to Oracle (ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin))
Tests skiped.
skipped
all skipped: no reason given
t/21nchar...............DBI connect('','scott/tiger',...) failed: ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin) at t/nchar_test_lib.pl line 156
skipped
all skipped: Not connected to oracle
t/22nchar_al32utf8......DBI connect('','scott/tiger',...) failed: ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin) at t/nchar_test_lib.pl line 156
skipped
all skipped: Not connected to oracle
t/22nchar_utf8..........DBI connect('','scott/tiger',...) failed: ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin) at t/nchar_test_lib.pl line 156
skipped
all skipped: Not connected to oracle
t/23wide_db.............skipped
all skipped: Database character set is not Unicode
t/23wide_db_8bit........skipped
all skipped: Database character set is not Unicode
t/23wide_db_al32utf8....skipped
all skipped: Database character set is not Unicode
t/24implicit_utf8.......DBI connect('','scott/tiger',...) failed: ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin) at t/nchar_test_lib.pl line 156
skipped
all skipped: Not connected to oracle
t/25plsql...............Unable to connect to Oracle (ORA-00604: error occurred at recursive SQL level 1
ORA-00922: missing or invalid option (DBD ERROR: OCISessionBegin))
Tests skiped.
skipped
all skipped: no reason given
t/26exe_array...........DBI connect('','scott/tiger',...) failed: ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin) at t/26exe_array.t line 28
# Looks like you planned 14 tests but only ran 1.
# Looks like your test died just after 1.
dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 2-14
Failed 13/14 tests, 7.14% okay
t/30long................DBI connect('','scott/tiger',...) failed: ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin) at t/nchar_test_lib.pl line 156
Can't connect to database: ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin)
# Looks like your test died before it could output anything.
dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-470
Failed 470/470 tests, 0.00% okay
t/31lob.................DBI connect('','scott/tiger',...) failed: ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin) at t/nchar_test_lib.pl line 156
You tried to plan twice! Second plan at t/31lob.t line 16
# Looks like your test died before it could output anything.
dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-9
Failed 9/9 tests, 0.00% okay
t/40ph_type.............DBI connect('','scott/tiger',...) failed: ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin) at t/40ph_type.t line 29
Unable to connect to Oracle (ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin))
Tests skipped.
skipped
all skipped: no reason given
t/50cursor..............Unable to connect to Oracle as scott/tiger (ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin))
Tests skipped.
skipped
all skipped: no reason given
t/55nested..............Unable to connect to Oracle as scott/tiger (ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin))
Tests skipped.
skipped
all skipped: no reason given
t/60reauth..............ORACLE_USERID_2 not defined. Tests skipped.
skipped
all skipped: no reason given
t/70meta................Unable to connect to Oracle as scott/tiger (ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin))
Tests skipped.
skipped
all skipped: no reason given
Failed 4/20 test scripts, 80.00% okay. 525/540 subtests failed, 2.78% okay.
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/10general.t 255 65280 33 66 200.00% 1-33
t/26exe_array.t 255 65280 14 26 185.71% 2-14
t/30long.t 255 65280 470 940 200.00% 1-470
t/31lob.t 255 65280 9 18 200.00% 1-9
14 tests and 9 subtests skipped.
make: *** [test_dynamic] Fehler 255

# -------------------------------------------- #

1..33
Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration:
Platform:
osname=linux, osvers=2.6.5, archname=i586-linux-thread-multi
uname='linux delen 2.6.5 #1 smp wed dec 22 11:54:27 utc 2004 i686 i686 i386 gnulinux '
config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr -Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm -Duseshrplib=true -Doptimize=-O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -Wall -pipe'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -Wall -pipe',est_l
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing'
ccversion='', gccversion='3.3.3 (SuSE Linux)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =''
libpth=/lib /usr/lib /usr/local/lib
libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.3.3'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.3/i586-linux-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared'


Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
Built under linux
Compiled at Feb 5 2005 12:21:19
@INC:
/usr/lib/perl5/5.8.3/i586-linux-thread-multi
/usr/lib/perl5/5.8.3
/usr/lib/perl5/site_perl/5.8.3/i586-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.3
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.3/i586-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.3
/usr/lib/perl5/vendor_perl
.

------------------------------------------------------------------------------------------------------------

.



Relevant Pages