Answer the question
In order to leave comments, you need to log in
How to properly handle an exception when a procedure call is invalidated in the body of an ORACLE scheduler job?
Hello.
Version.
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
Is it possible in the body of the ORACLE scheduler job to somehow prevent a full stop by mistake when one of the procedures is invalidated?
ORA-06550: line 19, column 3:
PLS-00905: object MON.EXAMPLE1_POINTS is invalid
ORA-06550: line 19, column 3:
PL/SQL: Statement ignored
begin
begin
EXAMPLE1_POINTS('Да','новый"');
EXCEPTION
when OTHERS then null;
end;
begin
EXAMPLE2_POINTS('Да','средний"');
EXCEPTION
when OTHERS then null;
end;
begin
EXAMPLE3_POINTS('Да','старый"');
EXCEPTION
when OTHERS then null;
end;
end;
Answer the question
In order to leave comments, you need to log in
the problem was solved like this
declare
l_statement varchar2(32767);
begin
l_statement := 'begin
EXAMPLE1_POINTS(''Да'',''средний"'');
end;';
begin
execute immediate l_statement;
exception
when others
then
null;
/*log_error(sqlerrm);*/
end;
l_statement := 'begin
EXAMPLE2_POINTS(''Да'',''средний"'');
end;';
begin
execute immediate l_statement;
exception
when others
then
null;
/*log_error(sqlerrm);*/
end;
l_statement := 'begin
EXAMPLE3_POINTS(''Да'',''старый"'');
end;';
begin
execute immediate l_statement;
exception
when others
then
null;
/*log_error(sqlerrm);*/
end;
end;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question