Oracle:在作业 dbms_scheduler 中定义 job_priority
Oracle: define job_priority in a Job dbms_scheduler
我想在 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;
但是我得到了这个错误:
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:
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.
我想在 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;
但是我得到了这个错误:
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:
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.