日期:2014-05-16  浏览次数:20369 次

oracle 10g+ oracle schedule LOG 级别设置


--查看 SCHEDULE
select job_name,job_type,job_action,to_char(start_date,'yyyy-mm-dd hh24:mi:ss') TM,repeat_interval,enabled,state from user_scheduler_jobs;


--查看当前DBA所有的组
select consumer_group from dba_rsrc_consumer_groups;

--查看jobclass
select job_class_name,resource_consumer_group from dba_scheduler_job_classes;

--创建JOB_CLASS
BEGIN
DBMS_SCHEDULER.create_job_class (
job_class_name          => 'CLASSNAME',
resource_consumer_group => 'default_consumer_group');
END;
/

--创建取票  SCHEDULE CREATED BY CHENMY 
begin
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'JOB名称',
job_type => 'STORED_PROCEDURE',
job_action => '存储过程名',
START_DATE =>sysdate,
repeat_interval => 'FREQ=MINUTELY;INTERVAL=3'

);
end;
/

--开启 SCHEDULE
exec dbms_scheduler.enable('JOB名称');
--关闭日志
exec dbms_scheduler.set_attribute('JOB名称', 'logging_level',DBMS_SCHEDULER.logging_off);