Solved

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

Posted on 2007-03-26
4
559 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
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

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 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 configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now