oracle删除oem中自动备份job

  1. 云栖社区>
  2. 博客>
  3. 正文

oracle删除oem中自动备份job

rudy_gao 2014-06-13 19:06:37 浏览214
展开阅读全文

1.在oracle oem中可以执行自动备份的job,注意,其不在dba_jobs,dba_scheduler_jobs中

2.查看oem中的job

select a.job_name, b.execution_hours, b.execution_minutes
  from sysman.mgmt_job a, sysman.mgmt_job_schedule b
where a.schedule_id = b.schedule_id
   and a.job_type = 'Backup';

3.删除oem中的job,注意必需先DELETE_ALL_EXECUTIONS,而后STOP_ALL_EXECUTIONS,最后DELETE_JOB


DECLARE
BEGIN
  MGMT_JOBS.DELETE_ALL_EXECUTIONS(P_JOB_NAME => 'BACKUP_LABAPROD_000022', P_JOB_OWNER => 'SYS');
  MGMT_JOBS.STOP_ALL_EXECUTIONS(P_JOB_NAME => 'BACKUP_LABAPROD_000022', P_JOB_OWNER => 'SYS');
  MGMT_JOBS.DELETE_JOB(P_JOB_NAME => 'BACKUP_LABAPROD_000022', P_JOB_OWNER => 'SYS');
END;


4. 在Server -> Scheduler Central -> Jobs 中可以找到该job

网友评论

登录后评论
0/500
评论
rudy_gao
+ 关注