在11.2.0.3中增加了两个oracle_ocm的job
select owner,job_Name,job_style,JOB_ACTION,start_date,repeat_interval, state from Dba_Scheduler_Jobs where owner='ORACLE_OCM'
发现job_action是搞这两个存储过程:
ORACLE_OCM.MGMT_CONFIG.collect_config
ORACLE_OCM.MGMT_CONFIG.collect_stats
查看日志明显发现是执行这两个job报的错,查看对应包体和存储过程代码(这次oracle没加密):
procedure collect_config IS
CURSOR l_res_cur IS select inst_id,instance_number from gv$instance;
BEGIN
FOR inst_id_row in l_res_cur LOOP
submit_job_for_inst(inst_id_row.inst_id, inst_id_row.instance_number, JOB_NAME,
'BEGIN ORACLE_OCM.MGMT_DB_LL_METRICS.COLLECT_CONFIG_METRICS(''ORACLE_OCM_CONFIG_DIR''); END;',
'BEGIN ORACLE_OCM.MGMT_DB_LL_METRICS.WRITE_DB_CCR_FILE(''ORACLE_OCM_CONFIG_DIR2'', TRUE); END;');
END LOOP;
END collect_config;
再查select * from dba_directories发现没有''ORACLE_OCM_CONFIG_DIR2''这个dir,建一个就可以了,或者因为不用配置管理器,直接
exec dbms_scheduler.disable('ORACLE_OCM.MGMT_CONFIG_JOB')
exec dbms_scheduler.disable('ORACLE_OCM.MGMT_STATS_CONFIG_JOB')
得了。
metalink也有相应描述:
ORA-12012: error on auto execute of job ORACLE_OCM.MGMT_CONFIG_JOB_2_1" And "ORA-29280: invalid directory path" In Database AlertLog [ID 1453959.1]