0

Oracle - Close Your Cursors

oracle

Be sure to close all of your cursors. I'm not a big fan of cursors, but they are useful some of the time.

I added a slightly altered version of the join UDF, found here , to my Oracle box today. When I ran the first test, it ran great. Then I went to run it with a larger result set and it bombed. The error returned was:

ORA-01000: maximum open cursors exceeded

So I looked at the function a little closer, and realized that it was leaving the cursors open. So I added the following line after the end loop:

CLOSE p_cursor;

Now everything works great! 

tags:
oracle
anon said:
 
I ran into the same problem today and found your fix to the linked code - thanks!
 
posted 737 days ago
Add Comment Reply to: this comment OR this thread
 

Search