日期:2014-05-17 浏览次数:21171 次
BEGIN
SYS.DBMS_SCHEDULER.DROP_JOB
(job_name => 'EMP.JOB_STPOLLUTANTSTATSOURCE');
END;
/
BEGIN
SYS.DBMS_SCHEDULER.CREATE_JOB
(
job_name => 'EMP.JOB_STPOLLUTANTSTATSOURCE'
,start_date => TO_TIMESTAMP_TZ('2013/01/09 05:00:00.000000 +08:00','yyyy/mm/dd hh24:mi:ss.ff tzr')
,repeat_interval => 'Freq=Daily;Interval=1;ByHour=5'
,end_date => NULL
,job_class => 'DEFAULT_JOB_CLASS'
,job_type => 'STORED_PROCEDURE'
,job_action => 'P_ST_POLLUTANT_STAT_SOURCE_2'
,comments => '污染物日数据统计源统计,缓存数据到表ST_POLLUTANT_STATISTIC_SOURCE'
);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'EMP.JOB_STPOLLUTANTSTATSOURCE'
,attribute => 'RESTARTABLE'
,value => FALSE);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'EMP.JOB_STPOLLUTANTSTATSOURCE'
,attribute => 'LOGGING_LEVEL'
,value => SYS.DBMS_SCHEDULER.LOGGING_RUNS);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'EMP.JOB_STPOLLUTANTSTATSOURCE'
,attribute => 'MAX_FAILURES');
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'EMP.JOB_STPOLLUTANTSTATSOURCE'
,attribute => 'MAX_RUNS');
BEGIN
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'EMP.JOB_STPOLLUTANTSTATSOURCE'
,attribute => 'STOP_ON_WINDOW_CLOSE'
,value => FALSE);
EXCEPTION
-- could fail if program is of type EXECUTABLE...