PLSQL: Closing all open cursors

From: Ricardo Santos <>
Date: Thu, 24 Jan 2008 11:51:28 +0000
Message-ID: <>

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

Thanks for all your attention.

Best Regards,

Ricardo Santos.

Received on Thu Jan 24 2008 - 05:51:28 CST

Original text of this message