Solved

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

Posted on 2007-03-26
4
566 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
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
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 video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

680 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