How can i execute procedure in a job? This syntax does not work.
CodePudding user response:
execute
is a SQL*Plus command. You should use proper PL/SQL block, with BEGIN
- END
keywords.
job_action=> 'begin up_user; end;',
CodePudding user response:
If you want to execute a stored procedure in a job, you have the choice:
- Either use the job_type
PLSQL_BLOCK
in which case you'll have to define an actual block
,job_type => 'PLSQL_BLOCK'
,job_action => 'BEGIN up_user; END;'
- Or use the job_type
STORED_PROCEDURE
. This only needs the name of the stored procedure as argument
job_type => 'STORED_PROCEDURE',
job_action => 'up_user',
No better place to look than the official documentation