如何停止正在运行的job,最好有代码实例。

解决方案 »

  1.   

    SQL>   select   job,broken   from   user_jobs;   
        
      JOB   B   
      ---   -   
      110   N   
        
      已选择   1   行。   
        
      SQL>   execute   dbms_job.broken(110,true);   
        
      PL/SQL   过程已成功完成。   
        
      SQL>   select   job,broken   from   user_jobs;   
        
      JOB   B   
      ---   -   
      110   Y   
        
      已选择   1   行。   
      
      

  2.   

    在SQL Plus中:
    1.select job,what from user_jobs;
    找到job的number号码,例如job号码为1。
    2.
    begin
    dbms_job.remove(1);--此处的1对应上面查找到的并且为你要停止的job的number
    commit;
    end;
    /