Difference between revisions of "Dbms scheduler jobs, programs and schedules"
From dbawiki
(Created page with "* http://www.oracle-base.com/articles/10g/scheduler-10g.php Some useful queries") |
|||
| Line 1: | Line 1: | ||
* [[http://www.oracle-base.com/articles/10g/scheduler-10g.php Some useful queries]] | * [[http://www.oracle-base.com/articles/10g/scheduler-10g.php Some useful queries]] | ||
| + | |||
| + | ===Create a scheduled job=== | ||
| + | <pre> | ||
| + | DBMS_SCHEDULER.CREATE_JOB( job_name => 'rebuild_view_all_rmans' | ||
| + | , job_type => 'STORED_PROCEDURE' | ||
| + | , job_action => 'create_all_rmans.rebuild_view' | ||
| + | , repeat_interval => 'FREQ=DAILY;BYHOUR=8;BYMINUTE=0;BYSECOND=0' | ||
| + | , enabled => TRUE | ||
| + | , comments => 'Rebuild view ALL_RMANS'); | ||
| + | |||
| + | </pre> | ||
| + | ===Run a scheduled job=== | ||
| + | <pre> | ||
| + | execute dbms_scheduler.run_job('IBMTOOLS.REBUILD_VIEW_ALL_RMANS'); | ||
| + | </pre> | ||
Revision as of 12:44, 1 February 2013
Create a scheduled job
DBMS_SCHEDULER.CREATE_JOB( job_name => 'rebuild_view_all_rmans'
, job_type => 'STORED_PROCEDURE'
, job_action => 'create_all_rmans.rebuild_view'
, repeat_interval => 'FREQ=DAILY;BYHOUR=8;BYMINUTE=0;BYSECOND=0'
, enabled => TRUE
, comments => 'Rebuild view ALL_RMANS');
Run a scheduled job
execute dbms_scheduler.run_job('IBMTOOLS.REBUILD_VIEW_ALL_RMANS');