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!

Why a savepoint gets invalid?

Jose ArósteguiJul 10 2019 — edited Jul 10 2019

Hi experts,


I'm using RDBMS 12.2.0.1.0 and I'm tracing some code where I'm getting this exception:

ORA-01086: savepoint 'INSERT_ACCOUNT_START' never established in this session or is invalid

Tracing it, I see that savepoint is for sure established in this line of code:

SAVEPOINT insert_account_start;

And when I get to this line, the exception is raised:

IF l_err_val_counter > 0 THEN

    ROLLBACK TO insert_account_start;

END IF;

I don't see any rollback between these two code sections, so my questions here are:


1) Under what circumstances a savepoint gets invalid?

2) Is there any dictionary table where to query the savepoints of a session and its status?

Thanks,
Jose.

This post has been answered by Solomon Yakobson on Jul 10 2019
Jump to Answer
Comments
Post Details
Added on Jul 10 2019
3 comments
5,081 views