Loading....

CREATE A PROGRAM

begin

dbms_scheduler.create_program

(

program_name => ‘UPDATE_VERITAS’,

program_type => ‘EXECUTABLE’,

program_action => ‘/opt/oracle/scripts/blade08/update_veritas.sh’,

enabled => TRUE,

comments => ‘Check the Time’

);

end;

/

 CREATE A SCHEDULE
 

begin

dbms_scheduler.create_schedule

(

schedule_name => ‘EVERY_6_HOURS’,

repeat_interval => ‘FREQ=HOURLY; INTERVAL=6?,

comments => ‘Every 6 Hours’

);

end;

/

 
CREATE A JOB
 

begin

dbms_scheduler.create_job

(

job_name => ‘RUN_UPDATE_VERITAS’,

program_name => ‘UPDATE_VERITAS’,

schedule_name => ‘EVERY_6_HOURS’,

comments => ‘Run the program UPDATE_VERITAS every 6 Hours’,

enabled => TRUE

);

end;

/

 

RUN THE JOB MANUALLY

exec dbms_scheduler.run_job(’RUN_UPDATE_VERITAS’);

 
Check the job run status and other details      
 

select log_id, log_date, job_name, status, error#, additional_info
 from dba_scheduler_job_run_details
where job_name =’RUN_UPDATE_VERITAS’;

Please follow and like us:

Last Update: June 18, 2009  

June 18, 2009 221 Gavin Soorma
Total 0 Votes:
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Add A Knowledge Base Question !

You will receive an email when your question will be answered.

+ = Verify Human or Spambot ?

, ,

One thought on “Using DBMS_SCHEDULER to run a UNIX shell script

  1. Manzoor

    Hi could you pls put the contents of the
    script – ‘/opt/oracle/scripts/blade08/update_veritas.sh’

Leave a Comment

Your email address will not be published. Required fields are marked *

*
*

Social media & sharing icons powered by UltimatelySocial
Back To Top

Add A Knowledge Base Question !

You will receive an email when your question will be answered.

+ = Verify Human or Spambot ?