Loganathan Natarajan
asked on
How to Create job and run job in ORACLE
I have a Stored procedure which needs to be run every minute, for that I have a job in Oracle 10g. I have created a job
BEGIN
-- Job defined entirely by the CREATE JOB procedure.
DBMS_SCHEDULER.create_job (
job_name => 'Update_Status',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN ;updateStatus; END;',
start_date => SYSTIMESTAMP,
repeat_interval => 'freq=minutely; bysecond=0;',
end_date => NULL,
enabled => TRUE,
auto_drop => FALSE,
comments => 'Job defined entirely by the CREATE JOB procedure.');
end;
This above job needs to run for every one minute. But the status is not being updated? I do not know whether the job is stared or not how to get the status of the job, How to make it run?
BEGIN
-- Job defined entirely by the CREATE JOB procedure.
DBMS_SCHEDULER.create_job (
job_name => 'Update_Status',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN ;updateStatus; END;',
start_date => SYSTIMESTAMP,
repeat_interval => 'freq=minutely; bysecond=0;',
end_date => NULL,
enabled => TRUE,
auto_drop => FALSE,
comments => 'Job defined entirely by the CREATE JOB procedure.');
end;
This above job needs to run for every one minute. But the status is not being updated? I do not know whether the job is stared or not how to get the status of the job, How to make it run?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
why the penalty grade?
If so, have you run the job manually and verified that the status is being updated?
If so, have you run the job manually every minute (for a few minutes) and verified that the status is being updated?