我有一个OEM工作挂了几天,很遗憾没有启用日志记录,所以我想知道如何解决这个问题?或更好的方法来创建/处理OEM工作?
DECLARE
CHECK DATE;
BEGIN
CHECK := NULL;
PROCESS_MAIL_TOTAL(
CHECK => CHECK
);
END;
PROCESS_MAIL_TOTAL是PROCESS_MAIL_JOB OEM作业中使用的过程。
create or replace PROCEDURE PROCESS_MAIL_TOTAL
(
CHECK IN DATE )
AS
M_CHECK DATE;
M_DATE_FORMAT VARCHAR2(20);
BEGIN
M_DATE_FORMAT := 'YYYY-MM-DD';
IF ( CHECK IS NULL ) THEN
M_CHECK := to_date(TO_CHAR(sysdate - 1, M_DATE_FORMAT), M_DATE_FORMAT);
ELSE
M_CHECK := to_date(TO_CHAR(CHECK, M_DATE_FORMAT), M_DATE_FORMAT);
END IF;
DELETE
FROM MAIL_TABLE
WHERE mail_process_dt = M_CHECK;
INSERT INTO MAIL_TABLE
SELECT COUNT(*) total
FROM MAILBOX
WHERE MESSAGE LIKE '%Invalid%';
COMMIT;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Its Broke!');
END PROCESS_MAIL_TOTAL;
OEM错误:
当我尝试运行挂起作业时
java.sql.SQLException: ORA-27492: unable to run job "PROCESS_MAIL_JOB": scheduler unavailable Check the log/trace file for more Details
答案 0 :(得分:0)
尝试:
select * from v$parameter where upper(name) = 'JOB_QUEUE_PROCESSES';
JOB_QUEUE_PROCESSES“value”可能设置为0.我相信你需要一个alter system来改变它,例如:alter system set job_queue_processes = 10;
来自ORA错误代码27492:
如果将当前会话设置为false的作业运行,则无法发出 调度程序未激活。检查job_queue_processes参数的值, 问题dbms_ijob.set_enabled(true),数据库处于升级/迁移状态 模式,数据库处于数据保护模式或调度程序属性 SCHEDULER_DISABLED设置为TRUE
在当前会话中运行作业或激活调度程序
答案 1 :(得分:0)
NUM NAME TYPE VALUE DISPLAY_VALUE ISDEFAULT ISSES_MODIFIABLE ISSYS_MODIFIABLE ISINSTANCE_MODIFIABLE ISMODIFIED ISADJUSTED ISDEPRECATED ISBASIC DESCRIPTION UPDATE_COMMENT HASH
1 job_queue_processes 3 0 0 FALSE FALSE IMMEDIATE TRUE FALSE FALSE FALSE FALSE maximum number of job queue slave processes 1663833312