---1.创建一个自定义过程
reate or replace procedure resch as
begin
delete from res_ge1 where a = 2;
commit;
delete from res_ge2 where b = 3;
commit;
delete from res_ge3 where c = d;
commit;
end;
/ ---------上面的存储过程,建立job后报错:
ORA-06550: 第 11 行, 第 0 列:
PLS-00103: 出现符号 "end-of-file"在需要下列之一时:
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> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
job3
reate or replace procedure resch as
begin
delete from res_ge1 where a = 2;
commit;
delete from res_ge2 where b = 3;
commit;
delete from res_ge3 where c = d;
commit;
end;
/ ---------上面的存储过程,建立job后报错:
ORA-06550: 第 11 行, 第 0 列:
PLS-00103: 出现符号 "end-of-file"在需要下列之一时:
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> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
job3
2 begin
3 delete from emp where empno = 2;
4 COMMIT;
5 delete from emp where empno = 3;
6 COMMIT;
7 delete from emp where empno = 4;
8 COMMIT;
9 end;
10 /
Procedure created
SQL> set serveroutput on
SQL>
SQL> DECLARE
2 v_job NUMBER(20);
3 BEGIN
4 dbms_job.submit(v_job,'begin resch; end;',SYSDATE,'SYSDATE+1/24/60');
5 dbms_output.put_line(v_job);
6 END;
7 /
70
PL/SQL procedure successfully completed
SQL> select * from dba_jobs t where t.JOB=70;
JOB LOG_USER PRIV_USER SCHEMA_USER LAST_DATE LAST_SEC THIS_DATE THIS_SEC NEXT_DATE NEXT_SEC TOTAL_TIME BROKEN INTERVAL FAILURES WHAT NLS_ENV MISC_ENV INSTANCE
---------- ------------------------------ ------------------------------ ------------------------------ ----------- ---------------- ----------- ---------------- ----------- ---------------- ---------- ------ -------------------------------------------------------------------------------- ---------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ---------------------------------------------------------------- ----------
70 SCOTT SCOTT SCOTT 2010-8-25 1 17:09:25 0 N SYSDATE+1/24/60 begin resch; end; NLS_LANGUAGE='SIMPLIFIED CHINESE' NLS_TERRITORY='CHINA' NLS_CURRENCY='¥' NLS_ISO 0102000200000000 0
SQL>
还有就是你的存储过程里的标点符号都是中文的-_-!
variable job1 number;
begin
sys.dbms_job.submit(job => :job1,
what => 'WLAN_1;',
next_date => trunc(sysdate,'HH')+1/24,
interval => 'SYSDATE+1/24');
commit;
end;
/