title: How can I use Oracle SQL developer to run stored procedures?
body: <p><strong>* EDIT6: *</strong> This is what ended up working for me (from accepted answer):</p>
  
  <pre><code>var ret1 number
  var tran_cnt number
  var msg_cnt number
  var rc refcursor
  exec :tran_cnt := 0
  exec :msg_cnt := 123
  exec get_account(Vret_val =&gt; :ret1, Vtran_count =&gt; :tran_cnt, Vmessage_count =&gt; :msg_cnt, Vaccount_id =&gt; 1, rc1 =&gt; :rc)
  print :tran_cnt
  print :msg_cnt
  print :rc
  </code></pre>
  
  <hr>
  
  <p>The SQL Developer makes this super-hard / impossible?. I do not care if the utility is command-line-based; I just want to be able to run and view it quickly. It would be nice if it captured errors well as well. it would be nice to be able to log in gradually(interactively), as well as specifying everything at once (similar to how a typical ftp / sftp cmd-based client works).</p>
  
  <p>My platform is Windows Server 2008 + Cygwin.</p>
  
  <p><strong><em>EDIT:</em></strong> Perhaps you would know how to script this using Python?</p>
  
  <p><strong><em>EDIT 2:</em></strong> In MSFT SQL server I can simply type this:</p>
  
  <pre><code>get_user 1;
  </code></pre>
  
  <p>then highlight it and hit F5, and I get:</p>
  
  <pre><code>login   name    
  NULL    Somename
  </code></pre>
  
  <p>printed to the output window. The Oracle SQL developer does not help with this at all. I am not sure how to pass in a 1, I am not sure how to see the actual rows/records that come back.</p>
  
  <p><strong><em>EDIT3:</em></strong> When I type just <code>var rc refcursor;</code> and select it and run it, I get this error (GUI):</p>
  
  <pre><code>An error was encountered performing the requested operation:
  
  ORA-00900: invalid SQL statement
  00900.00000 - "invalid SQL statement"
  * Cause:
  * Action:
  Vendor code 900Error at Line: 2
  </code></pre>
  
  <p><strong><em>EDIT4:</em></strong></p>
  
  <p>I am trying to run a procedure the definition of which starts like this:</p>
  
  <pre><code>create or replace procedure get_account
  (
      Vret_val out number,
      Vtran_count in out number,
      Vmessage_count in out number,
      Vaccount_id     IN NUMBER
      , rc1 in out sys_refcursor
  )as
  begin
  ...
  </code></pre>
  
  <p>I get an error:</p>
  
  <pre><code>Error starting at line 2 in command:
  exec :rc := get_account(1) 
  Error report:
  ORA-06550: line 1, column 24:
  PLS-00306: wrong number or types of arguments in call to 'GET_ACCOUNT'
  ORA-06550: line 1, column 7:
  PL/SQL: Statement ignored
  06550. 00000 -  "line %s, column %s:\n%s"
  *Cause:    Usually a PL/SQL compilation error.
  *Action:
  rc
  ------
  </code></pre>
  
  <p>I am so close ... please help.</p>
  
  <p><strong>* EDIT 5: *</strong></p>
  
  <p>Script that I am running (functionally the same), the error was always the same:</p>
  
  <pre><code>var ret1 number
  var tran_cnt number
  var msg_cnt number
  var rc refcursor
  exec :tran_cnt := 0
  exec :msg_cnt := 123
  exec get_account(Vret_val =&gt; :ret1, Vtran_count =&gt; :tran_cnt, Vmessage_count =&gt; :msg_cnt, Vaccount_id =&gt; 1, rc1 =&gt; rc)
  </code></pre>
  
  <p>Script Output (on F5) (Could be several messages from several runs.):</p>
  
  <pre><code>Error report:
  ORA-06550: line 1, column 134:
  PLS-00201: identifier 'RC' must be declared
  ORA-06550: line 1, column 7:
  PL/SQL: Statement ignored
  06550. 00000 -  "line %s, column %s:\n%s"
  *Cause:    Usually a PL/SQL compilation error.
  *Action:
  anonymous block completed
  anonymous block completed
  
  Error starting at line 7 in command:
  exec get_account(Vret_val =&gt; :ret1, Vtran_count =&gt; :tran_cnt, Vmessage_count =&gt; :msg_cnt, Vaccount_id =&gt; 1, rc1 =&gt; rc)
  Error report:
  ORA-06550: line 1, column 134:
  PLS-00201: identifier 'RC' must be declared
  ORA-06550: line 1, column 7:
  PL/SQL: Statement ignored
  06550. 00000 -  "line %s, column %s:\n%s"
  *Cause:    Usually a PL/SQL compilation error.
  *Action:
  anonymous block completed
  anonymous block completed
  
  Error starting at line 7 in command:
  exec get_account(Vret_val =&gt; :ret1, Vtran_count =&gt; :tran_cnt, Vmessage_count =&gt; :msg_cnt, Vaccount_id =&gt; 1, rc1 =&gt; rc)
  Error report:
  ORA-06550: line 1, column 134:
  PLS-00201: identifier 'RC' must be declared
  ORA-06550: line 1, column 7:
  PL/SQL: Statement ignored
  06550. 00000 -  "line %s, column %s:\n%s"
  *Cause:    Usually a PL/SQL compilation error.
  *Action:
  </code></pre>
  
  <p>Why does it say line 1, column 134? No line stretched that far ... </p>