今天晕晕沉沉的创建一个JOB,用PLSQL图形化界面没成功,SQL语句也没成果,最后发现竟然是job变量未定义,留个坑在这里……
SQL> begin
2 sys.dbms_job.submit(job => :job,
3 what => 'proc_export_containers;',
4 next_date => to_date('01-04-2011 00:00:00', 'dd-mm-yyyy hh24:mi:ss'),
5 interval => 'trunc(sysdate)+1+0/24');
6 commit;
7 end;
8 /
begin
sys.dbms_job.submit(job => :job,
what => 'proc_export_containers;',
next_date => to_date('01-04-2011 00:00:00', 'dd-mm-yyyy hh24:mi:ss'),
interval => 'trunc(sysdate)+1+0/24');
commit;
end;
ORA-01008: not all variables bound
SQL> variable job number;
SQL>
SQL> begin
2 sys.dbms_job.submit(job => :job,
3 what => 'proc_export_containers;',
4 next_date => to_date('01-04-2011 00:00:00', 'dd-mm-yyyy hh24:mi:ss'),
5 interval => 'trunc(sysdate)+1+0/24');
6 commit;
7 end;
8 /
PL/SQL procedure successfully completed
job
---------
181
本文转自zylhsy 51CTO博客,原文链接:http://blog.51cto.com/yunlongzheng/531985,如需转载请自行联系原作者