oracle11g - Getting ORA-06512: at "SYS.DBMS_ISCHED", line 124 and ORA-06512: at "SYS.DBMS_ISCHED", line 124 error -


i trying schedule job oracle 11g below getting error. begin

sqlplus / sysdba  sys.dbms_scheduler.create_job(  job_name=>'testjob',  job_type=>'plsql_block',  job_action=>'begin greetings; end;',  start_date=>systimestamp,  repeat_interval => 'byminute=0; bysecond=5;');  end;  / 

the error is

error report: ora-27465: invalid value byminute=0; bysecond=5; attribute repeat_interval  ora-06512: @ "sys.dbms_isched", line 124  ora-06512: @ "sys.dbms_scheduler", line 271  ora-06512: @ line 2 27465. 00000 -  "invalid value %s attribute %s" 

*cause: invalid value provided specified attribute.

*action: reissue command using valid value attribute.

initially thinking permission issue gave below permission

grant create job system;

grant execute on system.greetings public;

could identify problem?

everything in message. repeat interval wrong. check calendar syntax.

from documentation.

repeat_interval = regular_schedule | combined_schedule it's mean repeat interval has regular_schedule or combined_schedule.

where regular_schedule

regular_schedule = frequency_clause [";" interval_clause] [";" bymonth_clause] [";" byweekno_clause] ..etc 

it's mean frequency_clause mandatory other optional. in code, there no frequency_clause. working example. repeat_interval => 'freq=hourly; byminute=0; bysecond=5;'


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -