DBMS_SCHEDULER故障

时间:2018-09-21 11:53:27

标签: oracle plsql scheduler

我执行以下代码:

CURSOR JOB_RUNS_cur (P_JOB_NAME IN VARCHAR2)
  IS
     SELECT COUNT ( * )
       FROM ALL_SCHEDULER_RUNNING_JOBS
      WHERE OWNER = 'BATCH'
        AND JOB_NAME = P_JOB_NAME;

   DerAktuelleJob   := 'BATCH_SST_AENDERUNGEN_JOB';

     OPEN JOB_RUNS_cur (DerAktuelleJob);

     FETCH JOB_RUNS_cur INTO Anzahl;

     CLOSE JOB_RUNS_cur;

     -- Bei Anzahl=0 läuft der Job aktuell nicht und kann gestartet werden
     IF Anzahl = 0 THEN
        **DBMS_SCHEDULER.ENABLE ('BATCH.BATCH_SST_AENDERUNGEN');**
        DBMS_SCHEDULER.ENABLE ('BATCH.' || DerAktuelleJob);
     END IF;

有时我会得到这个 错误DBMS_SCHEDULER.ENABLE ('BATCH.BATCH_SST_AENDERUNGEN');

Error in sql query: ORA-01013: User requested abort of current operation
> ORA-00604: Error at recursive SQL level 1
ORA-01013: User requested cancellation of the current operation
ORA-06512: in "SYS.DBMS_ISCHED", line 4790
ORA-06512: in "SYS.DBMS_SCHEDULER", line 3020

谁可以帮助我分析/解决问题?

0 个答案:

没有答案