Home > Mobile >  Job with procedure in pl/sql
Job with procedure in pl/sql

Time:10-19

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:

  1. Either use the job_type PLSQL_BLOCKin which case you'll have to define an actual block
    ,job_type        =>  'PLSQL_BLOCK'
    ,job_action      =>  'BEGIN up_user; END;'
  1. 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

  • Related