?
Solved

Oracle open_cursor

Posted on 2010-11-15
5
Medium Priority
?
808 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 1500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
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…
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 shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Suggested Courses

770 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