Oracle: define job_priority in a Job dbms_scheduler

834 views Asked by At

I Want to create a job with the highest priority in Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

BEGIN
  DBMS_SCHEDULER.CREATE_JOB (
   job_name         =>  'parseMsg',
   job_type         =>  'PLSQL_BLOCK',
   job_action       =>  'begin S_IN_TDK.parseMsg; end;',
   repeat_interval  =>  'FREQ=SECONDLY;INTERVAL=1',
   enabled          =>  true,
   job_priority     =>  1,
   comments         => 'Job that polls device n2 every 1 seconds');
END;

but I got this error:

Informe de error -
ORA-06550: line 2, column 3:
PLS-00306: wrong number or types of arguments in call to 'CREATE_JOB'
ORA-06550: line 2, column 3:
PL/SQL: Statement ignored
06550. 00000 -  "line %s, column %s:\n%s"
*Cause:    Usually a PL/SQL compilation error.
*Action:
1

There are 1 answers

0
Arkadiusz Łukasiewicz On BEST ANSWER

https://docs.oracle.com/database/121/ARPLS/d_sched.htm#ARPLS72302

Not all possible job attributes can be set with CREATE_JOB. Some must be set after the job is created. For example, job arguments must be set with the SET_JOB_ARGUMENT_VALUE Procedure or the SET_JOB_ANYDATA_VALUE Procedure. Other job attributes, such as job_priority and max_runs, are set with the SET_ATTRIBUTE Procedure.