Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can we rollback before job changes if anyhow job fails?

sahil kansraMay 28 2021 — edited May 28 2021

Hello every one , I have one small question I am trying to run my procedure in anonymous block in a loop in that procedure some jobs are running .once that procedure executed again my job is running in same block .
I want to rollback my all the procedure changes when job in main transaction failed. Is this possible.Can we rollback job changes .
For example
declare
begin
begin
For i in 1..3
loop
savepoint abc;
Proc1();//calling a procedure which inside calling another job
end loop;
end;
sys.dbms_job ();//run a job then

if above sys job = 'faliled' // want to rollback my all procedure changes
rollback to ABC;
end if;
end;
Regards,
Sam

Comments
Post Details
Added on May 28 2021
1 comment
575 views