I am working on a project in which I am working on database where in java program I need to read the clob data from datafile and then creating clob object and setting clob data in the object and insert row. I am doing batch insert with 10000 rows. But after reading some (32) rows, I am getting following error:-
java.io.IOException: ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
at oracle.jdbc.driver.OracleClobOutputStream.flushBuffer(OracleClobOutputStream.java:293)
at oracle.jdbc.driver.OracleClobOutputStream.write(OracleClobOutputStream.java:191)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1793)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744)
I searched this error online and found some solutions on site. I have executed the following queries then:-
select value from v$parameter where name = 'db_block_size';
select bytes/1024/1024 as mb_size,
maxbytes/1024/1024 as maxsize_set, x.*
from dba_data_files x;
alter tablespace system add datafile 'C:\APP\ADMIN\ORADATA\VIDUSHIEXTRACT\DATAFILE\O2_MF_USERS_FLHMH039_.DBF' size 5024m autoextend on maxsize unlimited;
FYI: In my db the above type of data files are multiple.
But after all this also I got the same error after 32 rows(I have 1028 rows total in my table, in which each clob column data has approx 4MB data). So please can anyone tell me what should I do now, in order to resolve this issue?