title: oracle procedure with clob as in parameter (large text)
body: <p>I'm facing a problem when trying to insert a large text object into oracle database using procedure.</p>
  
  <p>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.</p>
  
  <p>Ibatis:</p>
  
  <pre><code>&lt;parameterMap id="EttAttrCall" class="java.util.Map"&gt;
          &lt;parameter property="ettAttrLst" jdbcType="CLOB" javaType="java.lang.String" mode="IN"/&gt;
          &lt;parameter property="pjtId" jdbcType="VARCHAR2" javaType="java.lang.String" mode="IN"/&gt;
          &lt;parameter property="createUser" jdbcType="VARCHAR2" javaType="java.lang.String" mode="IN"/&gt;
      &lt;/parameterMap&gt;
      &lt;procedure id="insertTmpEttAttr" parameterMap="EttAttrCall"&gt;
         { call INS_TMP_ETT_ATTR(?,?,?)}  
      &lt;/procedure&gt;
  </code></pre>
  
  <p>oracle procedure:</p>
  
  <pre><code>create or replace
  PROCEDURE INS_TMP_ETT_ATTR
  (
    ettAttrLst IN CLOB,  
    pjtId IN VARCHAR2,
    createUser IN VARCHAR2
  ) 
  </code></pre>
  
  <p>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</p>
  
  <p>I tried to search over internet but not much useful information. So any advice or idea will be highly appreciated.</p>