Link to home
Create AccountLog in
Avatar of Loganathan Natarajan
Loganathan NatarajanFlag for India

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?
Avatar of edtechdba
edtechdba
Flag of United States of America image

Have you checked to make sure your stored procedure runs properly by itself and updates the status?

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?
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Sean Stuber
Sean Stuber

why the penalty grade?