通过Control的oracle调度任务信息可以得到某个调度组中无效的任务名,具体如下:
select * from def_job M where M.Table_Id in (select d.table_id from def_tables d where d.sched_table ='DWT_NCM' )and M.Table_Id||'-'||M.Job_Id in
(select p.table_id||'-'||p.job_id from def_lnki_p p where substr(p.condition,instr(p.CONDITION,'-')+1,length(p.CONDITION)-instr(p.CONDITION,'-')-6)
in
(select distinct substr(t.condition,instr(t.CONDITION,'-')+1,length(t.CONDITION)-instr(t.CONDITION,'-')-6) from def_lnki_p t where (t.job_id,t.table_id)in
(select k.job_id,k.table_id from def_job k where k.job_name not like '%_PRE_JOB'and k.table_id in (select d.table_id from def_tables d where d.sched_table ='调度组名'))
minus
select b.job_name from def_job b where b.JOB_NAME in (
select distinct substr(t.condition,instr(t.CONDITION,'-')+1,length(t.CONDITION)-instr(t.CONDITION,'-')-6) from def_lnki_p t where (t.job_id,t.table_id)in
(select k.job_id,k.table_id from def_job k where k.job_name not like '%_PRE_JOB' and k.table_id in
(select d.table_id from def_tables d where d.sched_table ='调度组名')))))
阅读(823) | 评论(0) | 转发(0) |