title: Submitting multiple jobs in PLSQL using dbms_job.submit - Job not found in queue error
body: <p>I want to kick off to separate (parallel) task in plsql using dbms_submit. (Note that I am not passing any interval data with my submit invocations).</p>
  
  <p>In my example .. for some reason when I try to call run on the second job, I get a job not found in queue error. Any ideas on my the second job is not being added to the job queue?</p>
  
  <pre><code>set serveroutput on
  DECLARE
    jobno number;
    jobno2 number;
  BEGIN
  
    dbms_job.submit(jobno,'begin dbms_lock.sleep(10); dbms_output.put_line(''test1'');end;');
    commit;
    dbms_job.submit(jobno2,'begin dbms_lock.sleep(5); dbms_output.put_line(''test2'');end;');
    commit;
  
    dbms_output.put_line(jobno || ' ' || jobno2);
  
    dbms_job.run(jobno);
    dbms_job.run(jobno2);
  
  END;
  /
  </code></pre>
  
  <p>Error report:</p>
  
  <p>ORA-23421: job number 154230 is not a job in the job queue
  ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
  ORA-06512: at "SYS.DBMS_IJOB", line 770
  ORA-06512: at "SYS.DBMS_JOB", line 267
  ORA-06512: at line 14
  23421. 00000 -  "job number %s is not a job in the job queue"
  *Cause:    There is no job visible to the caller with the given job number.
  *Action:   Choose the number of a job visible to the caller.</p>
  
  <p>Output:</p>
  
  <p>154229 154230</p>
  
  <p>test1</p>