title: how to unlock locked tables explicitly in oracle
body: <p>I have a master stored procedure which calls multiple stored procedures to write data on multiple tables, around 9-10 in one go. And once all the inserts are done, there is one commit for all of them.<br>
  I want to use data concurrency and lock tables in individual sub procedures, which does not have any commit, so </p>
  
  <blockquote>
    <p>LOCK TABLE table_name IN lock_mode </p>
  </blockquote>
  
  <p>will work, but will hold the table until rest of the data is been inserted in the respective tables called after this and the final commit or rollback is called, which is not a good idea. Also I don't have <code>dbms_lock</code> opened.</p>
  
  <p>Will locking all the tables in my master stored procedures, or locking the tables in the respective sub-stored procedures is the only option??  </p>
  
  <p>My master stored procedure looks like this  </p>
  
  <pre><code>PROCEDURE POPULATE_ALL(P_ASOFDATE DATE, P_ENTITY VARCHAR2) IS
      BEGIN
        POPULATE_ABC_BOOK(P_ASOFDATE);
        POPULATE_XYZ(P_ASOFDATE, P_ENTITY);
        POPULATE_DEF(P_ASOFDATE, P_ENTITY);
        POPULATE_AAA(P_ASOFDATE, P_ENTITY);
      commit;
      EXCEPTION
       WHEN OTHERS THEN
         rollback;
         P_ERROR := SQLERRM;
         RAISE_APPLICATION_ERROR(-20001,
                                '*** Unexpected Error in POPULATE_ALL --&gt;' ||
                                P_ERROR);
     END POPULATE_ALL;
  </code></pre>
  
  <p>where POPULATE_XYZ is populating XYZ table.</p>