create table a(a date);--创建一个自定义过程create or replace procedure test as
begin
insert into a values(sysdate);
end;
--创建JOB
variable job1 number;
begin
dbms_job.submit(:job1,'test;',sysdate,'sysdate+1/1440');
commit;
end;
--
begin
dbms_job.run(:job1);
end;执行创建JOB时报错begin
dbms_job.submit(:job1,'test;',sysdate,'sysdate+1/1440');
commit;
end;
错误报告:
ORA-06550: 第 2 行, 第 66 列:
PLS-00103: 出现符号 ""在需要下列之一时:
( begin case declare end
exception exit for goto if loop mod null pragma raise return
select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
continue close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe purge
符号 "" 被忽略。
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:版本:oracle 11
begin
insert into a values(sysdate);
end;
--创建JOB
variable job1 number;
begin
dbms_job.submit(:job1,'test;',sysdate,'sysdate+1/1440');
commit;
end;
--
begin
dbms_job.run(:job1);
end;执行创建JOB时报错begin
dbms_job.submit(:job1,'test;',sysdate,'sysdate+1/1440');
commit;
end;
错误报告:
ORA-06550: 第 2 行, 第 66 列:
PLS-00103: 出现符号 ""在需要下列之一时:
( begin case declare end
exception exit for goto if loop mod null pragma raise return
select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
continue close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe purge
符号 "" 被忽略。
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:版本:oracle 11
begin
dbms_job.submit(:job1,'test;',sysdate,'sysdate+1/1440');
commit;
end;
test--它要大写
create table a(a date);
create or replace procedure tests as
begin
insert into a values(sysdate);
end tests;
variable job1 number;
begin
dbms_job.submit(:job1,'TESTS;',sysdate,'sysdate+1/1440');--TESTS;要大写
end;
begin
dbms_job.run(:job1);
end;
SQL> select * from a;A
-------------------
2011-05-25 14:44:18SQL> select * from a;A
-------------------
2011-05-25 14:44:18
2011-05-25 14:45:22SQL> select * from a;A
-------------------
2011-05-25 14:44:18
2011-05-25 14:45:22
2011-05-25 14:46:23