title: Max open cursors exceeded - Oracle 11g | ibatis 2.3.4 | spring 3.0.3
body: <p>We have recently migrated from Sybase to Oracle 11g database. Our application uses spring 3.0.3 along with IBATIS 2.3.4 to interact with database.
  Recently, we have started facing ORA-01000 Maximum open cursors exceeded exception.
  We talked to our DBA and he confirmed that for each row insertion we are occupying one cursor which is not correct. The cursor size is 300 as set by the DBA.</p>
  
  <p>Can you please suggest how do we handle this through ibatis configuration or Java code?
  We've never faced this issue with Sybase.</p>
  
  <p>The current code structure in our DAO class:</p>
  
  <pre><code>try{
      sqlMapClient.startTransaction();
      sqlMapClient.startBatch();
  
      for(...){
          sqlMapClient.insert(&lt;in table 1&gt;);
          sqlMapClient.insert(&lt;in table 2&gt;);
      }
  
      sqlMapClient.executeBatchDetailed();
      sqlMapClient.commitTransaction();
  }
  
  catch(..){
  
  }
  
  finally{
  
      sqlMapClient.endTransaction();
  
  }
  </code></pre>
  
  <p>Note: We cannot perform intermediate commit as the operation needs to be all or none.</p>