WEB开发网
开发学院数据库Oracle Oracle调度程序作业dbms_scheduler 阅读

Oracle调度程序作业dbms_scheduler

 2008-10-13 12:56:24 来源:WEB开发网   
核心提示: ^比如,重新定义scheduler属性:BEGINdbms_scheduler.set_attribute(name=>'DAILY_PURGE_SCHEDULE',attribute=>'repeat_interval',value=>&

^比如,重新定义scheduler属性:

  BEGIN
  dbms_scheduler.set_attribute(name=>'DAILY_PURGE_SCHEDULE',attribute=>'repeat_interval',value=>'FREQ=DAILY;BYHOUR=1;BYMINUTE=0;BYSECOND=0');
  END;

^比如重新修改program;

  BEGIN
  DBMS_SCHEDULER.SET_ATTRIBUTE(
  name=>'P_1',
  attribute=>'PROGRAM_ACTION',
  value=>'/backup/2.sh');
  END;

^比如重新定义一个job属性

  BEGIN
  dbms_scheduler.set_attribute_null(name=>'GATHER_STATS_JOB',attribute=>'schedule_name');
  dbms_scheduler.set_attribute(name=>'GATHER_STATS_JOB',attribute=>'repeat_interval',value=>'FREQ=DAILY;BYHOUR=2;BYSECOND=0');
  END;

等等…....

相关的表/视图:

  SQL>selectVIEW_NAMEfromdba_viewsawherea.view_namelike'DBA_SCHEDULER%';
  VIEW_NAME
  ------------------------------
  DBA_SCHEDULER_PROGRAMS
  DBA_SCHEDULER_JOBS
  DBA_SCHEDULER_JOB_CLASSES
  DBA_SCHEDULER_WINDOWS
  DBA_SCHEDULER_PROGRAM_ARGS
  DBA_SCHEDULER_JOB_ARGS
  DBA_SCHEDULER_JOB_LOG
  DBA_SCHEDULER_JOB_RUN_DETAILS
  DBA_SCHEDULER_WINDOW_LOG
  DBA_SCHEDULER_WINDOW_DETAILS
  DBA_SCHEDULER_WINDOW_GROUPS
  DBA_SCHEDULER_WINGROUP_MEMBERS
  DBA_SCHEDULER_SCHEDULES
  DBA_SCHEDULER_RUNNING_JOBS
  DBA_SCHEDULER_GLOBAL_ATTRIBUTE
  DBA_SCHEDULER_CHAINS
  DBA_SCHEDULER_CHAIN_RULES
  DBA_SCHEDULER_CHAIN_STEPS
  DBA_SCHEDULER_RUNNING_CHAINS

应该说,这些视图根据字面意思来讲,比较好理解,也不做过多描述.

上一页  1 2 3 4 5 

Tags:Oracle 调度 程序

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接