G.Chahar
G.Chahar

Reputation: 185

Getting error - "Encountered the symbol " " when expecting one of the following" while creating Job

I am getting below error while creating new job.

Error report -
ORA-06550: line 2, column 2:
PLS-00103: Encountered the symbol " " when expecting one of the following:

   ( begin case declare exit for goto if loop mod null pragma
   raise return select update while with <an identifier>
   <a double-quoted delimited-identifier> <a bind variable> <<
   continue close current delete fetch lock insert open rollback
   savepoint set sql execute commit forall merge pipe purge
06550. 00000 -  "line %s, column %s:\n%s"
*Cause:    Usually a PL/SQL compilation error.
*Action:

This is the code that I am using for creating Job. Can you please help me in that.

BEGIN
  DBMS_SCHEDULER.create_job (
    job_name        => 'P_DELETE',
    job_type        => 'PLSQL_BLOCK',
    job_action      => 'BEGIN ADMIN.DELETE_REG; COMMIT; END;',
    start_date      => SYSTIMESTAMP,
    repeat_interval => 'FREQ=WEEKLY; BYDAY=FRI; BYHOUR=3; ',  
    enabled         => TRUE);
END; 

Please help!

Upvotes: 0

Views: 962

Answers (1)

APC
APC

Reputation: 146219

PLS-00103: Encountered the symbol " " when expecting one of the following:

I think the problem is in your repeat_interval argument.

The ; is used to separate different period elements, with no semi-colon after the last element. However, your string ends '; ' which explains why Oracle hurls.

The solution would be to pass this instead:

repeat_interval => 'FREQ=WEEKLY; BYDAY=FRI; BYHOUR=3'

Upvotes: 1

Related Questions