Hello, setting dbd_verbose leads to no additional output. It's only:
DBD::Oracle::st fetchrow_arrayref failed: ORA-24806: LOB form mismatch (DBD ERROR: OCILobRead) [for Statement "select * from ttt where rownum <2"] at s.pl line 15. record couldn't be fetched!! at s.pl line 15. It seems that I can't install a newer DBI or DBD version. The Perlscipt has to run on this (our productive) environment. Here my script: -------------------- #!/usr/local/bin/perl use DBI; use strict; my $dbh = DBI->connect('DBI:Oracle:db','u','p',{dbd_verbose => 9}) or die "No database connection!"; $dbh->{LongReadLen} = 16384; # set buffer length for blobs # session settings my $sth = $dbh->prepare("alter session set NLS_DATE_FORMAT='YYYY-MM-DD_hh24:mi:ss'") or die "No prepare: ".DBI->errstr; $sth->execute or die "No exec".$sth->errstr; $sth->finish(); my $sthRow = $dbh->prepare("select * from ttt where rownum <2") or die "Prepare of Database query failed!"; $sthRow->execute() or die "Execution of database query failed!"; $sthRow->fetchrow_arrayref or die "record couldn't be fetched!!"; ------------------- DBD Version: $Revision: 11.21 $ SQL> show parameter nls NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ nls_calendar string nls_comp string nls_currency string nls_date_format string nls_date_language string nls_dual_currency string nls_iso_currency string nls_language string AMERICAN nls_length_semantics string CHAR nls_nchar_conv_excp string FALSE nls_numeric_characters string NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ nls_sort string nls_territory string AMERICA nls_time_format string nls_time_tz_format string nls_timestamp_format string nls_timestamp_tz_format string SQL> yoyo -------- Original-Nachricht -------- > Datum: Fri, 3 Jun 2011 13:27:54 -0400 > Von: John Scoles <byter...@hotmail.com> > An: y...@mailueberfall.de, dbi-users@perl.org > Betreff: RE: perl DBI Oracle NCLOB fetching > > That only ocures when the nclob going in is not compatiable with the nclob > field you are trying to stuff it into. > > one thing that wil give us a little more info is to connect with > dbd_verbose=9 on the attributes and that will tell us you NSL setting. > > also get your DBA to check > > NLS_CHARACTERSET > NLS_NCHAR_CHARACTERSET > NLS_LANGUAGE > NLS_TERRITORY > > > These should all match up. > > Your DBI is rather old what is you version of DBD::Oracle > > you might want to upgrade both > > Cheers > John > > > > Date: Fri, 3 Jun 2011 19:03:46 +0200 > > From: y...@mailueberfall.de > > To: dbi-users@perl.org > > Subject: perl DBI Oracle NCLOB fetching > > > > Hello, > > > > my Perl script uses uses the DBI interface to connect to Oracle and runs > > a select statement. But if one column is of type NCLOB it fails with: > > > > DBD::Oracle::st fetchrow_hashref failed: ORA-24806: LOB form mismatch > > (DBD ERROR: OCILobRead) [for Statement "SELECT * FROM ttt WHERE > ROWNUM=1"] > > > > I googled a lot and didn't found any solution for it. According to the > > used versions of Perl, DBI and Oracle and the NLS settings it should > work. > > > > Any idea how to get it working? > > > > Here are my used versions: > > > > DBI::VERSION = "1.41" > > perl, v5.8.0 > > > > SQL> desc ttt > > Name Null? Type > > ------------------------------------------------------------------------ > > T1 NCLOB > > UMSISDN VARCHAR2(200 CHAR) > > SPARTID NUMBER(2) > > > > bash-3.00$ env | grep -i nls > > NLS_LANG=AMERICAN_AMERICA.UTF8 > > > NLSPATH=:/export/home/omni/locale/%L/%N.cat:/export/home/omni/locale/%L/%N > > > > Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit > Production > > > > much thanks, > > yoyo > > > -- NEU: FreePhone - kostenlos mobil telefonieren! Jetzt informieren: http://www.gmx.net/de/go/freephone