i have this problem, into my oracle db i have too much cursor still opened that increase the mamory usage. The cursor was opened by C# and i can't modify the program. Is it possible to close all cursor open in a session from oracle with a query withous close session?
Asked
Active
Viewed 247 times
0
-
2"The cursor was opened by C# and i can't modify the program." The solution is to fix the C# program so that it closes the cursors. anything else is just a temporary solution as you're going to be closing cursors every time the program runs (and maybe multiple times while the program runs). – MT0 Oct 06 '22 at 14:34
-
Probably a duplicate of https://stackoverflow.com/q/29562561/1509264 or https://stackoverflow.com/q/12192592/1509264 (even though they are both about Java the principal is identical between the languages and the general advice is applicable to this question). – MT0 Oct 06 '22 at 14:38
1 Answers
0
Only the session that opened the cursor can close the cursor; you cannot close cursors from another session.
This means that your solutions are:
- Fix the C# program that opened the cursors. (See java.sql.SQLException: - ORA-01000: maximum open cursors exceeded for some generic advice on this);
- Kill the session that the C# program is using, which will automatically close all its cursors (and hope that the application is robust enough to recover and open a new session); or
- Change the database settings to increase the maximum number of cursors (this may not fix the problem but it may delay it; however, it may cause other problems if the database starts using too many resources to manage all those open cursors).

MT0
- 143,790
- 11
- 59
- 117