Problems connecting to Oracle DB on SLES
am 31.08.2007 09:37:51 von Thorsten.HarmsHi,
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 =3D "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/rdb=
ms/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-mult=
i/auto/DBI -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-alias=
ing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -O2 -march=3Di586 =
-mcpu=3Di686 -fmessage-length=3D0 -Wall -Wall -pipe -DVERSION=3D\"1.19\" =
-DXS_VERSION=3D\"1.19\" -fPIC "-I/usr/lib/perl5/5.8.3/i586-linux-thread-mul=
ti/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSIO=
N=3D\"9.2.0.6\" DBD_ORA_OBJ.c
by executing: [make -f /opt/oracle/product/9ir2/rdbms/demo/demo_rdbms.mk =
build ECHODO=3Decho ECHO=3Decho GENCLNTSH=3D'echo genclntsh' CC=3Dtrue =
OPTIMIZE=3D CCFLAGS=3D EXE=3DDBD_ORA_EXE OBJS=3DDBD_ORA_OBJ.o]
Oracle oci build command:
[true -L/opt/oracle/product/9ir2/lib/ -L/opt/oracle/product/9ir2/rd=
bms/lib/ -o DBD_ORA_EXE DBD_ORA_OBJ.o -lclntsh `cat /opt/oracle/product/9=
ir2/lib/sysliblist` -ldl -lm ]
Found header files in /opt/oracle/product/9ir2/rdbms/demo /opt/oracle/produ=
ct/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=20
Compiler: cc -O2 -march=3Di586 -mcpu=3Di686 -fmessage-length=3D0 -Wall =
-Wall -pipe -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-alia=
sing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64
Linker: /usr/bin/ld
Sysliblist: -ldl -lm -lpthread -lnsl -lirc=20
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/rd=
bms/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_SOUR=
CE -D_LARGEFILE64_SOURCE=3D1 -D_LARGEFILE_SOURCE=3D1 -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 =3D -L/opt/oracle/product/9ir2/lib/ -L/opt/oracle=
/product/9ir2/rdbms/lib/ -lclntsh `cat /opt/oracle/product/9ir2/lib/sys=
liblist` -ldl -lm [from 'build' rule]
LD_RUN_PATH=3D/opt/oracle/product/9ir2/lib:/opt/oracle/produ ct/9ir2/rdbms/l=
ib
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/rdb=
ms/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-mult=
i/auto/DBI -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-alias=
ing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -O2 -march=3Di586 =
-mcpu=3Di686 -fmessage-length=3D0 -Wall -Wall -pipe -DVERSION=3D\"1.19\" =
-DXS_VERSION=3D\"1.19\" -fPIC "-I/usr/lib/perl5/5.8.3/i586-linux-thread-mul=
ti/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSIO=
N=3D\"9.2.0.6\" Oracle.c
cc -c -I/opt/oracle/product/9ir2/rdbms/demo -I/opt/oracle/product/9ir2/rdb=
ms/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-mult=
i/auto/DBI -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-alias=
ing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -O2 -march=3Di586 =
-mcpu=3Di686 -fmessage-length=3D0 -Wall -Wall -pipe -DVERSION=3D\"1.19\" =
-DXS_VERSION=3D\"1.19\" -fPIC "-I/usr/lib/perl5/5.8.3/i586-linux-thread-mul=
ti/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSIO=
N=3D\"9.2.0.6\" dbdimp.c
cc -c -I/opt/oracle/product/9ir2/rdbms/demo -I/opt/oracle/product/9ir2/rdb=
ms/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-mult=
i/auto/DBI -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-alias=
ing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -O2 -march=3Di586 =
-mcpu=3Di686 -fmessage-length=3D0 -Wall -Wall -pipe -DVERSION=3D\"1.19\" =
-DXS_VERSION=3D\"1.19\" -fPIC "-I/usr/lib/perl5/5.8.3/i586-linux-thread-mul=
ti/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSIO=
N=3D\"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=3D"/opt/oracle/product/9ir2/lib:/opt/oracle/prod uct/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 =
=20
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_explai=
n
Manifying blib/man1/ora_explain.1
Manifying blib/man3/DBD::Oracle.3pm
Manifying blib/man3/DBD::Oraperl.3pm
# -------------------------------------------- #
PERL_DL_NONLAZY=3D1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harn=
ess(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: OCISessionBegi=
n) 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: OCISessionBegi=
n) 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: OCISessionBegi=
n))
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: OCISessionBegi=
n) 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: OCISessionBegi=
n) 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: OCISessionBegi=
n) 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: OCISessionBegi=
n) 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: OCISessionBegi=
n) 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: OCISessionBegi=
n) 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: OCISessionBegi=
n)
# 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: OCISessionBegi=
n) 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: OCISessionBegi=
n) 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: OCISessionBegi=
n))
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: OCISessionBegi=
n))
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: OCISessionBegi=
n))
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: OCISessionBegi=
n))
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=3Dlinux, osvers=3D2.6.5, archname=3Di586-linux-thread-multi
uname=3D'linux delen 2.6.5 #1 smp wed dec 22 11:54:27 utc 2004 i686 =
i686 i386 gnulinux '
config_args=3D'-ds -e -Dprefix=3D/usr -Dvendorprefix=3D/usr -Dinstallus=
rbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm -Duseshrplib=3Dtrue =
-Doptimize=3D-O2 -march=3Di586 -mcpu=3Di686 -fmessage-length=3D0 -Wall =
-Wall -pipe'
hint=3Drecommended, useposix=3Dtrue, d_sigaction=3Ddefine
usethreads=3Ddefine use5005threads=3Dundef useithreads=3Ddefine =
usemultiplicity=3Ddefine
useperlio=3Ddefine d_sfio=3Dundef uselargefiles=3Ddefine usesocks=3Dund=
ef
use64bitint=3Dundef use64bitall=3Dundef uselongdouble=3Dundef
usemymalloc=3Dn, bincompat5005=3Dundef
Compiler:
cc=3D'cc', ccflags =3D'-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS =
-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64',
optimize=3D'-O2 -march=3Di586 -mcpu=3Di686 -fmessage-length=3D0 -Wall =
-Wall -pipe',est_l
cppflags=3D'-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-=
aliasing'
ccversion=3D'', gccversion=3D'3.3.3 (SuSE Linux)', gccosandvers=3D''
intsize=3D4, longsize=3D4, ptrsize=3D4, doublesize=3D8, byteorder=3D123=
4
d_longlong=3Ddefine, longlongsize=3D8, d_longdbl=3Ddefine, longdblsize=
=3D12
ivtype=3D'long', ivsize=3D4, nvtype=3D'double', nvsize=3D8, Off_t=3D'of=
f_t', lseeksize=3D8
alignbytes=3D4, prototype=3Ddefine
Linker and Libraries:
ld=3D'cc', ldflags =3D''
libpth=3D/lib /usr/lib /usr/local/lib
libs=3D-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=3D-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=3D, so=3Dso, useshrplib=3Dtrue, libperl=3Dlibperl.so
gnulibc_version=3D'2.3.3'
Dynamic Linking:
dlsrc=3Ddl_dlopen.xs, dlext=3Dso, d_dlsymun=3Dundef, ccdlflags=3D'-rdyn=
amic -Wl,-rpath,/usr/lib/perl5/5.8.3/i586-linux-thread-multi/CORE '
cccdlflags=3D'-fPIC', lddlflags=3D'-shared'
Characteristics of this binary (from libperl):=20
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
.
------------------------------------------------------------ ---------------=
---------------------------------