1

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?

  • Please show us the create statement of the table you are inserting the CLOBs into. – wolφi Jun 21 '18 at 11:52
  • I guess it's more an issue of closing temporary CLOBs than a tablespace issue, so please show us the statements that create the clob object, set the clob data and insert the row... – wolφi Jun 21 '18 at 11:55
  • Agree with @wolφi, please share the size of the TEMP tablespace and the clob object details. TEMP space is like Heap space in Java if it is getting filled then most of the time the code needs to be modified. – vishad Jun 21 '18 at 12:00

1 Answers1

2

you extended the SYSTEM tablespace by adding a datafile, but you need to extent the TEMP tablespace (as suggested by the error)

davegreen100
  • 2,055
  • 3
  • 13
  • 24