Cpu x86
Os Kylin v10
dm8 --03134284458-20251113-301923-20178
--dm8查看已有作业
select ID,
NAME,
ENABLE,
USERNAME,
ENABLE_EMAIL,
EMAIL_OPERID,
EMAIL_TYPE,
ENABLE_NETSEND,
NETSEND_OPERID,
NETSEND_TYPE,
DESCRIBE,
EP_SEQNO,
RAFT_NAME,
SYS_FLAG
from SYSJOB.SYSJOBS
ORDER BY NAME ;
--执行某个作业
--call SP_DBMS_JOB_RUN('作业ID');
call SP_DBMS_JOB_RUN(1776303688);
--删除某个作业
--call SP_DROP_JOB('作业名');
call SP_DROP_JOB('DBBAK');
--dm8查看全部作业执行历史
select job_his.exec_id,
job_his.name,
step_his.stepname,
job_his.start_time,
job_his.end_time,
job_his.errcode,
job_his.errinfo,
job_his.has_notified,
step_his.start_time,
step_his.end_time,
step_his.errtype,
step_his.errcode,
step_his.errinfo,
step_his.retry_attempts,
steps.seqno,
step_his.ep_seqno,
step_his.raft_name
from (select top 0,
100 job_his.*,
jobs.id
from sysjob.sysjobhistories2 job_his
left join sysjob.sysjobs jobs
on jobs.id = job_his.jobid
-- 查看某个作业的执行记录
-- where job_his.jobid = 1776303687
order by start_time desc) job_his
left join sysjob.sysstephistories2 step_his
on job_his.exec_id = step_his.exec_id
left join SYSJOB.SYSJOBSTEPS steps
on steps.name = step_his.stepname
and steps.jobid = job_his.id
order by job_his.end_time desc,
step_his.end_time desc,
steps.seqno desc;
文章
阅读量
获赞
