PLSQL: Closing all open cursors

Hello to you all,

I would like to know if there is any simple way to close all open cursors by
a PL/SQL procedure when an exception raises and the control goes to the
EXCEPTION section of the procedure. Should I explicitly use the CLOSE
statement on the EXCEPTION section for all cursors I use on the procedure ?

I'm using OPEN and FETCH statements to deal with my cursors and not FOR.

During some tests to my application, I got an exception (divide by zero) and
when I tried to execute the procedure on the same session, I got the error,
cursor already open. My intention is to avoid this situation.



I'm developing on Database Server version 10.1.0.5.





Thanks for all your attention.



Best Regards,

Ricardo Santos.

Other related posts: