?
Solved

Oracle cursor lifecycle inside procedure.

Posted on 2017-03-10
2
Medium Priority
?
65 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 2000 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Suggested Courses

777 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