SQL> grant execute on dbms_job to kin;
Grant succeeded.
SQL> conn kin/kin;
Connected.
--create job
SQL> declare
2 v_job number;
3 begin
4 dbms_job.submit(v_job,'P_CREATETABNAME;',sysdate,'sysdate+1/(24*60)');
5 commit;
6 end;
7 /
PL/SQL procedure successfully completed.
SQL> select job from user_jobs;
JOB
---
21
--execute job
SQL> begin
2 dbms_job.run(21);
3 end;
4 /
PL/SQL procedure successfully completed.
-- delete job
SQL> begin
2 dbms_job.remove(21);
3 end;
4 /
PL/SQL procedure successfully completed.
SQL> select job from user_Jobs;
no rows selected