2017-09-11 8 views
1

Je veux créer un emploi avec la plus haute priorité dans Oracle Database 11g Express Edition de presse 11.2.0.2.0 - 64bit productionOracle: définir JOB_PRIORITY dans un emploi DBMS_SCHEDULER

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; 

mais j'eu cette erreur:

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: 

Répondre

1

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.