title: Invoke SQL Loader from Java Program is not running if file size > 40 MB
body: <p>We are trying to load a huge file (say ~1 GB size) into an Oracle database via SQL Loader. I have created a Java program which will execute the SQLLoader command from the program and loader will load the file into the table.</p>
  
  <p>My Code:</p>
  
  <pre><code>  public void invokeSQLLoader(){
  
      String stringCommand="/usr/lib/oracle/18.3/client64/bin/sqlldr &lt;userId&gt;/&lt;password&gt;@&lt;dburl&gt; control=/u01/hmpoc/HM_EDW_PASSBACK.ctl data=/u01/hmpoc/Passback_Report.csv bad=/u01/hmpoc/PASSBACK.bad discard=/u01/hmpoc/PASSBACK.dsc log=/u01/hmpoc/PASSBACK.log ERRORS=1000000";
  
      System.out.println("Passing Command::"+stringCommand);
  
      Process proc = null;
  
      try {
              System.out.println("Starting procedure call---"+new java.util.Date());
  
              Runtime rt = Runtime.getRuntime();
              proc = rt.exec(stringCommand.trim());
  
              System.out.println("End Procedure call---"+new java.util.Date());
  
      }catch (IOException e) {
              e.printStackTrace();
      } catch (NullPointerException e) {
              e.printStackTrace();
      }/*finally {
              proc.destroy();
      }*/
      System.out.println("SQLLDR Ended");
  }
  </code></pre>
  
  <p>Question and query to all the experts:</p>
  
  <ol>
  <li><p>When the file size is ~ 40 MB , we can load data via my Java program.</p></li>
  <li><p>When the file size > 42 MB , Java program runs successfully but data not get loaded with the file. No error or exception shown in the Java console. Where as if I ran the same command from command prompt with same control file and data file it is getting loaded.</p></li>
  </ol>
  
  <p>Can anyone please help me? If I am missing something or what is the best way to invoke sqlloader from Java program apart from my approach.</p>