Gayatri
Gayatri

Reputation: 1

DBMS scheduler error ORA-27465: invalid value freq=weekly;?byday=sun; byhour=22; byminute=0;

    begin
Dbms_Scheduler.Create_Job(
job_name => 'JOB_HK_SALES'
,job_type => 'PLSQL_BLOCK'
,job_action => 'BEGIN leadcapture.delete_old_records_SND(); END;'
,start_date => '30-SEP-2016 22:00:00'
,repeat_interval => 'freq=WEEKLY; byday=sun; byhour=22; byminute=0; bysecond=0;'
,enabled => TRUE
,Comments => 'Job to housekeep table records.');
end;
/     

I am getting below error after running above procedure

ORA-27465: invalid value freq=weekly;?byday=sun; byhour=22; byminute=0; bysecond=0; for attribute REPEAT_INTERVAL
ORA-06512: at "SYS.DBMS_ISCHED", line 99
ORA-06512: at "SYS.DBMS_SCHEDULER", line 262
ORA-06512: at line 2

Upvotes: 0

Views: 1852

Answers (1)

0xdb
0xdb

Reputation: 3697

The statement is syntactically ok. You can simply check your script for undesirable characters before you try to compile it. Use something like this:

grep -aq -e '[^[:print:]]' create_job.sql   

Upvotes: 0

Related Questions