#1 2016-09-10 04:55:51

KevinChen
Member
Registered: 2016-09-10
Posts: 10

Got Oracle Error ORA-01406 while fetching large data set

Hi,

I've run a test using the Sample "12 - SynDB Explorer".
I tried to fetch a large dataset through Oracle DB which contained more than 200,000 rows and with 35 columns.
The program got the error "ORA-01406: fetched column value was truncated" unless I limited the returned rows to around 110,000.

I thought the error came by client buffer shortage and tried to adjust some buffersize parameters like
"fRowsPrefetchSize", "fInternalBufferSize", RowCount, RowSize ...etc.
But I still can't find the solution.

Any help would be appreciated.

Offline

#2 2016-09-10 06:03:25

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,548
Website

Re: Got Oracle Error ORA-01406 while fetching large data set

What NLS_LANG you use?

Dose it crash on this sample dataset

-- Create table create table TEST_ORA_01406_TAB ( DESCRIPTION VARCHAR2(35) not null ); 
alter table TEST_ORA_01406_TAB add constraint TEST_ORA_01406_PK primary key (DESCRIPTION) using index; 
insert into test_ora_01406_tab select substr(lpad( Rownum, 3 , '0' ) || 'ZAŻÓŁĆ GĘŚLĄ JAŹŃ ZAŻÓŁĆ GĘŚLĄ JAŹŃ', 1, 35) From dual Connect By Rownum <= 101

Offline

#3 2016-09-13 01:41:12

KevinChen
Member
Registered: 2016-09-10
Posts: 10

Re: Got Oracle Error ORA-01406 while fetching large data set

The NLS_LANG of my Oracle DB is AMERICAN_AMERICA.ZHT16BIG5. I have traced the code and it worked well to deal with the Character Set.

Yesterday, I unknowingly adjusted fInternalBufferSize to 128*1024*256 and it just succeeded for 193868 rows (57.2 MB).

With my limited capability, I couldn't figure out how does it run within the section "3. Dispatch data in row buffer".
Would someone give me more hints?

Much appreciated.

Offline

Board footer

Powered by FluxBB