Is It Possible To Schedule a Stored Procedure Passing Arguments When Executed By a Job? (Doc ID 296636.1)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version: 10.1.0.3
Information in this document applies to any platform.
Checked for relevance on 29-May-2009

Goal

Is it possible to create a program that executes a stored procedure passing arguments to it when executed by a job like

BEGIN
dbms_scheduler.create_program(
program_name => 'Example',
program_type => 'stored_procedure',
program_action => 'some_pkg.proc('':1'');'
number_of_arguments => 1
);
END;
/
begin
dbms_scheduler.create_job(
job_name => 'Test_Job',
program_name => 'Example',
start_date => systimestamp
);

DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
job_name => 'Test_Job',
argument_name => '':1',
argument_value => 'ABC'
);
dbms_scheduler.enable('Test_Job');
end;
/

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms