Oracle Plsql : How to complete execution of a procedure without waiting for its subprogram to complete -
in oracle plsql, i'm calling stored procedure after performing action on screen. after execution of piece of code want insert records table insert should happen after 20 mins. want run insert job/procedure independently main procedure completes execution.
any sort of appreciated !!
hope below snippet helps.
--table create dummy insertion create table test_so_tab ( col1 number ); --procedure replicate scenario create or replace procedure test_so_scheduler( p_in in number) lv sys.odcinumberlist; begin select level bulk collect lv dual connect level < 100; dbms_scheduler.create_job ( job_name => 'delta_refresh_job', job_type => 'plsql_block', job_action => 'declare lv1 sys.odcinumberlist; begin select level bulk collect lv1 dual connect level < 100; if lv1.exists(1) forall in lv1.first..lv1.last insert test_so_tab values ( lv1(i) ); end if; end', start_date => systimestamp+ interval '20' minute, end_date => null, enabled => true, comments => 'job defined entirely create job procedure.'); end; /
Comments
Post a Comment