Simple Procedure with SUBMIT : dbms_job « System Packages « Oracle PL / SQL






Simple Procedure with SUBMIT

   
SQL> --
SQL>
SQL> CREATE OR REPLACE PROCEDURE HELLO AS
  2  BEGIN
  3      DBMS_OUTPUT.PUT_LINE ('Hello World! ' || TO_CHAR(SYSDATE,'MM-DD-YY HH:MM:SS AM'));
  4  END;
  5  /

Procedure created.

SQL>
SQL>
SQL> DECLARE
  2       v_JobNum  BINARY_INTEGER;
  3  BEGIN
  4        DBMS_JOB.SUBMIT(v_JobNum,'HELLO;',SYSDATE, 'SYSDATE + (1/(24*60*60))');
  5  END;
  6  /

PL/SQL procedure successfully completed.

SQL>
SQL> --

   
    
  








Related examples in the same category

1.Using DBMS_OUTPUT to See the Assigned Job Number
2.Using the SUBMIT Procedure
3.DBMS_JOB package.
4.Use dbms_job.submit to call 'execute immediate'
5.Remove a procedure from the queue after 5 executions.
6.how to submit TempInsert as a job.
7.Submit job to change password