I'm facing a problem when trying to insert a large text object into oracle database using procedure.
My program has to insert thousands of items into oracle database, as the performance issue of inserting one-by-one, I wrote a oracle procedure and insert all item at once.
Ibatis:
<parameterMap id="EttAttrCall" class="java.util.Map">
<parameter property="ettAttrLst" jdbcType="CLOB" javaType="java.lang.String" mode="IN"/>
<parameter property="pjtId" jdbcType="VARCHAR2" javaType="java.lang.String" mode="IN"/>
<parameter property="createUser" jdbcType="VARCHAR2" javaType="java.lang.String" mode="IN"/>
</parameterMap>
<procedure id="insertTmpEttAttr" parameterMap="EttAttrCall">
{ call INS_TMP_ETT_ATTR(?,?,?)}
</procedure>
oracle procedure:
create or replace
PROCEDURE INS_TMP_ETT_ATTR
(
ettAttrLst IN CLOB,
pjtId IN VARCHAR2,
createUser IN VARCHAR2
)
Everything works fine if the data length is not exceeded 3 million characters, but if more than that number, oracle will throw this exception: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
I tried to search over internet but not much useful information. So any advice or idea will be highly appreciated.