Solved

Too many cursors opened on using sys_ref cursor as out parameter in a procedure

Posted on 2007-03-26
4
567 Views
Last Modified: 2013-12-19
All Configurable parameters for the application are stored in a table, various modules of the application read these parameter values through one single interface.

The interface module runs in a separate background thread, which reads the  values of table periodically ( every 3 min) through a Stored Procedure, The stored Procedure uses a ref cursor to return data back to the application.

It was noticed that insetad of using the cusror cache, a new cursor is opened everytime a refresh happens, and these cursors stay open for long time. The Stored proceure itself uses simple select statement without any where clauses to read values from table.(select a,b,c from table abc;)

How do we avoid opening cursor every time the stored proc is executed by the background job. How do we improve the performance.

Regards
Swapna


 
0
Comment
Question by:hiswapna
[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
4 Comments
 
LVL 9

Accepted Solution

by:
konektor earned 125 total points
ID: 18794020
if you use sys_refcursor as output parameter in procedure, it means, that the procedure opens cursor for some select an code which calls the procedure has to close cursor after reading from it
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Via a live example, show how to take different types of Oracle backups using RMAN.

734 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