Solved

Oracle cursor lifecycle inside procedure.

Posted on 2017-03-10
2
46 Views
Last Modified: 2017-03-24
How to find out how many cursor are in open stage inside a procedure and how to close all cursor at a time.
0
Comment
Question by:MIHIR KAR
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 42042859
I don't believe there is a way to close all with a single call.

I'm also not sure of a way to say what cursors belong to what specific procedure's execution.  You might e able to loop through some of the V$ views and look for open cursors and tie them back to a specific procedure but is all that work really worth it?

When the session executing the procedure ends any remaining open cursors will be closed.
2
 

Author Closing Comment

by:MIHIR KAR
ID: 42063655
Thnks for the useful tips.
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question