DECLARE 
  1 NUMBER; 
BEGIN 
  SYS.DBMS_JOB.SUBMIT 
  ( job       => 1 
   ,what      => 'PRO_HIS_DICT_JCB;' 
   ,next_date => to_date('26/09/2008 00:00:00','dd/mm/yyyy hh24:mi:ss') 
   ,interval  => 'sysdate + 1' 
   ,no_parse  => FALSE 
  ); 
  SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(1)); 
COMMIT; 
END; 我用plsql建的一个作业语句如上可是建完了没反应不知道是什么原因,请高手指教谢谢。

解决方案 »

  1.   

    DECLARE  
      X NUMBER;  
    BEGIN  
      SYS.DBMS_JOB.SUBMIT  
      ( job => X  
      ,what => 'PRO_HIS_DICT_JCB;'  
      ,next_date => to_date('26/09/2008 00:00:00','dd/mm/yyyy hh24:mi:ss')  
      ,interval => 'sysdate + 1'  
      ,no_parse => FALSE  
      );  
      SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(1));  
    COMMIT;  
    END;  试试这个。 
    ------------------------------------------------------------------------------ 
    Blog: http://blog.csdn.net/tianlesoftware 
    网上资源: http://tianlesoftware.download.csdn.net 
    相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx 
    DBA1 群:62697716(满); DBA2 群:62697977(满)
    DBA3 群:63306533;     聊天 群:40132017
      

  2.   

    SQL> VARIABLE jobno number;
    SQL> 
    SQL>  begin
      2    DBMS_JOB.SUBMIT(:jobno,
      3    'pro_his_dict_jcb;',
      4    SYSDATE,'sysdate+1');
     
     begin
      DBMS_JOB.SUBMIT(:jobno,
      'pro_his_dict_jcb;',
      SYSDATE,'sysdate+1')
     
    ORA-06550: line 2, column 2:
    PLS-00103: Encountered the symbol "" when expecting one of the following:   begin case declare exit for function goto if loop mod null
       package pragma procedure raise return select separate type
       update while with <an identifier>
       <a double-quoted delimited-identifier> <a bind variable> <<
       form table call close current define delete fetch lock insert
       open rollback savepoint set sql execute commit forall merge
       library OPERATOR_ pipe
    jobno
    ---------
     
    SQL>   commit;
     
    Commit complete
    SQL>   end;
     
      end
     
    ORA-00900: invalid SQL statement我又用了一个别的语句抱这个错。请各位给看一下。