Reputation: 93
i have a problem here, i already have a Stored Procedure called "SP_DEL_TOKEN" and i wanna make a job to run the Stored procedure automatically everyday..
this is my script to make the job
VAR jobno NUMBER;
BEGIN
DBMS_JOB.SUBMIT(:jobno, 'SP_DEL_TOKEN', SYSDATE, 'SYSDATE+1');
COMMIT;
END;
/
but when i do that script, i encountered with this error
ERROR at line 1:
ORA-06550: line 1, column 106:
PLS-00103: Encountered the symbol "END" when expecting one of the following:
:= . ( @ % ;
The symbol ";" was substituted for "END" to continue.
ORA-06512: at "SYS.DBMS_JOB", line 79
ORA-06512: at "SYS.DBMS_JOB", line 136
ORA-06512: at line 2
please help me, and thanks for helping me :)
Upvotes: 1
Views: 7746
Reputation: 36807
You need a semicolon at the end of the "what" parameter. Use 'SP_DEL_TOKEN;'
instead of 'SP_DEL_TOKEN'
. See the manual for some more examples.
I'm not sure why this is. With dynamic SQL you cannot have a semicolon, and with dynamic PL/SQL you need the BEGIN
and END;
. I guess this parameter is used in some weird context.
Upvotes: 1