Search code examples
oracle-databasejobs

Oracle: Error launching job through dbms_scheduler


This is the instruction I use:

BEGIN
  DBMS_SCHEDULER.RUN_JOB(25950);
  commit;
END;

And this is the error I get

ORA-00931: missing identifier
ORA-06512: at "SYS.DBMS_UTILITY", line 132
ORA-06512: at "SYS.DBMS_UTILITY", line 164
ORA-06512: at "SYS.DBMS_UTILITY", line 218
ORA-06512: at "SYS.DBMS_SCHEDULER", line 437
ORA-06512: at line 2

Solution

  • run_job expects the job_name, not an id.

    From documentation:

    DBMS_SCHEDULER.RUN_JOB (
       job_name                IN VARCHAR2,
       use_current_session     IN BOOLEAN DEFAULT TRUE);