O código da procedure é este, rodei ela manualmente e está funcionando.
create or replace
procedure manutencao_projetos
is
begin
delete from reator_ensaios where reator in (select reator from projeto where ((trunc(sysdate)-trunc(dt_ultima_visual) > (select tempo_max_armz_proj from parametros_sistema))));
delete from ciclo_sobrecarga where id_ciclo in (select ciclo_um from reator where id_reator in (select reator from projeto where ((trunc(sysdate)-trunc(dt_ultima_visual) > (select tempo_max_armz_proj from parametros_sistema)))));
delete from ciclo_sobrecarga where id_ciclo in (select ciclo_dois from reator where id_reator in (select reator from projeto where ((trunc(sysdate)-trunc(dt_ultima_visual) > (select tempo_max_armz_proj from parametros_sistema)))));
delete from tecnologia_fed where id_tecnologia_fed in (select tecnologia from reator where id_reator in (select reator from projeto where ((trunc(sysdate)-trunc(dt_ultima_visual) > (select tempo_max_armz_proj from parametros_sistema)))));
delete from tecnologia_osd where id_tecnologia_osd in (select tecnologia from reator where id_reator in (select reator from projeto where ((trunc(sysdate)-trunc(dt_ultima_visual) > (select tempo_max_armz_proj from parametros_sistema)))));
delete from tecnologia where id_tecnologia in (select tecnologia from reator where id_reator in (select reator from projeto where ((trunc(sysdate)-trunc(dt_ultima_visual) > (select tempo_max_armz_proj from parametros_sistema)))));
delete from corrente_harmonica where reator is null;
delete from tap where osd is null;
delete from sobrecarga where ciclo_sobrecarga is null;
commit;
EXCEPTION
WHEN OTHERS THEN
raise_application_error(-20001,'Ocorreu um erro - '||SQLCODE||' -ERRO- '||SQLERRM);
rollback;
END;
declare
jobno number;
begin
sys.dbms_job.submit(jobno,
what => 'begin manutencao_projetos; end;',
next_date => to_date('08-11-2010 20:41:52', 'dd-mm-yyyy hh24:mi:ss'),
interval => 'TRUNC(sysdate+1) + 23/24');
commit;
end;
ORA-12011, ORA-06512 (SYS.DBMS_IJOB, line 406 e SYS.DBMS_JOB, line 272), *Cause: An error was caught in dbms_ijob.run from one or more jobs which were due to be run.
Bom, o que poderia ser? Aguardo e agradeço a ajuda!