title: SQL Plus - how to pass big string to procedure CLOB's parameter
body: <p>I have procedure that receives an XML:</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE PROCESS_XML(xml IN CLOB) AS
  BEGIN
    DBMS_OUTPUT.PUT_LINE('XML processing started');
  END;
  </code></pre>
  
  <p>Now I'm doing a bash script that will download some XML files from a server and, for each one, I will call the above procedure using SQL Plus. </p>
  
  <pre><code>#!/bin/bash
  file=$(curl -s "http://example.com/someFile.xml");
  sqlplus myuser/mypass@myhost:1521/myscheme &lt;&lt;&lt; "EXECUTE PROCESS_XML('$file')";
  </code></pre>
  
  <p>It works fine for small file but for big ones, I'm getting the following error:</p>
  
  <pre><code>SQL*Plus: Release 12.1.0.2.0 Production on Thu Jun 8 18:28:19 2017
  Copyright (c) 1982, 2016, Oracle.  All rights reserved.
  
  Connected to:
  Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
  With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP
  and Data Mining options
  SQL&gt; Input truncated to 7499 characters
  SP2-0027: Input is too long (&gt; 2499 characters) - line ignored
  </code></pre>
  
  <p>Is there anything I could in order to send those big XML?</p>
  
  <p>Thanks</p>