ALTER JOB
ALTER JOB#
Syntax#
alter_job ::=#
execute_procedure_statement ::=#
Prerequisites#
Only the SYS user can change the JOB with this statement. In order to perform the created JOB, it should be activated with ENABLE when creating or after creating the JOB.
Description#
The definition of the JOB created with the CREATE JOB statement can be changed. The execution statement of the procedure registered for the JOB, the start time and end time of the JOB, the execution interval of the job and etc. can be changed with this statement.
job_name#
This specifies the name of the JOB to be changed.
START#
This specifies the time at which the JOB is to start.
END#
This specifies the time at which the JOB is to end.
expr1#
This accepts only a DATA type value or a DATE type expression.
INTERVAL number#
This specifies the interval after which the JOB is to run again, after it has run for the first time. The unit of time is determined by the YEAR, MONTH, DAY, HOUR, MINUTE which is specified after the number.
expr2#
This specifies the input argument value necessary for the execution of the defined procedure as a constant or an expression.
ENABLE/DISABLE#
This is used to modify whether to execute each join in the job scheduler.
COMMENT#
This allows users to modify the job description
Examples#
<Query> Change job1 to the enabled state.
iSQL> ALTER JOB job2 SET ENABLE;
Alter success.
<Query> Change job2 to the disabled state.
iSQL> ALTER JOB job2 SET DISABLE;
Alter success.
<Query> Change the start time of job1 to 'January 1st, 2013'.
iSQL> ALTER JOB job1 SET START to_date('20130101','YYYYMMDD');
Alter success.
<Query> Change the procedure to execute in job2 to the proc1 procedure in usr1.
iSQL> alter job job2 set exec usr1.proc1;
Alter success.
<Query> Change the start time of job2 to 'June 3rd, 2013'.
iSQL> alter job job2 set start to_date('2013/06/03 10:00:00','YYYY/MM/DD HH24:MI:SS');
Alter success.
<Query> Change the end time of job2 to 'June 7th, 2013 10:00:00'.
iSQL> alter job job2 set end to_date('2013/06/07 10:00:00', 'YYYY/MM/DD HH24:MI:SS');
Alter success.
<Query> Change the interval after which job2 is to run to 10 minutes.
iSQL> alter job job2 set interval 10 minute;
Alter success.