---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

解决方案 »

  1.   

    SQL> create or replace procedure resch as
      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> 
      

  2.   

    不知道你是怎么建立job的.描述下建立job的过程吧.
    还有就是你的存储过程里的标点符号都是中文的-_-!
      

  3.   

    我原来建立的job的方式是下面这样的,报错,用你的就没错:
    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;
    /
      

  4.   

    新建JOB可以指定 job号吗?
      

  5.   

    job号是oracle帮你分配的,你只要取别名就可以了