Solved

Oracle open_cursor

Posted on 2010-11-15
5
804 Views
Last Modified: 2012-05-10
We are using apex with Oracle 11g in our application

We are facing number of open_cursor value exceeds.

Can we see which part of the code is causing problem?

Sachin
0
Comment
Question by:sachin_dba
[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
  • 3
  • 2
5 Comments
 
LVL 13

Expert Comment

by:sonicefu
ID: 34134811
you can increase the open_cursors by using the following statement

ALTER SYSTEM SET open_cursors=300 SCOPE=SPFILE; -- >> you can use different value instead
0
 

Author Comment

by:sachin_dba
ID: 34134979
I want to understand which module (procedure/functions) or sessions are opening more cursors.
0
 
LVL 13

Accepted Solution

by:
sonicefu earned 500 total points
ID: 34135029
Following query may help you
SELECT c.sid AS "Oracle Session ID",
         c.address AS "SQL Address",
         c.hash_value AS "SQL Address Hash",
         COUNT (c.saddr) AS "Cursor Copies",
         c.SQL_ID,
         c.SQL_TEXT
    FROM v$open_cursor c
GROUP BY c.sid,
         c.address,
         c.hash_value,
         c.SQL_ID,
         c.SQL_TEXT
  HAVING COUNT (c.saddr) > 2
ORDER BY 3 DESC;

Open in new window

0
 

Author Comment

by:sachin_dba
ID: 34247044
All the apex sessions have more values. ie

SID                Program                            No. of Open Cursors
425      JDBC Thin Client      347
275      JDBC Thin Client      96
334      JDBC Thin Client      80

All the sessions are in waiting stage from long time.

Why apex sessions requires so may cursors?
0
 

Author Closing Comment

by:sachin_dba
ID: 36876560
Thanks
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle function to insert records? 15 82
error in my cursor 5 61
How to drop system generated virtual column in a table in12c 15 189
SQL query to select row with MAX date 7 66
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
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 videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

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