How to get oracle killed exceptions -
i have following structure in stored procedure:
loop try update record state "1" make process update record state "2" commit exception update record state "3" //error ! end end loop now lets supose there error session kill, or client disconnect, while loop running. how can threat error? try..exception not working. need write "3" state field of record.
you can consider:
loop try update record state "3" commit update record state "1" make process update record state "2" commit end end loop so, start setting status "3" , commit. start actual processing. if session killed before process ends, changes since first commit rolled back, status rolled "3". if processing ends successfully, changes commited , status set "2".
i don't understand why set status "1", never visible outside transaction, overwritten "2" before transaction commit.
Comments
Post a Comment