笔记:创建JOB时ORA-01008的处理

今天晕晕沉沉的创建一个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

你可能感兴趣的:(plsql,职场,job,ora-01008,休闲)