OPEN_CURSORS parameter - Ask TOM (2024)

Pauline, April 09, 2001 - 3:23 pm UTC

You give the very clear concept explanation here.

open_cursors

Parag Jayant Patankar, January 29, 2005 - 6:42 am UTC

Hi Tom,

I am trying to understand concept of open_cursors in Oracle 9.2. Thanks for your excellent answer in this thread.

Can you pl tell me

Q1. How to arrive the good paramter ( optimum parameter ) of open_cursors ?

Q2. Suppose I set up the value overboard that is 1,000,000 for this parameter ( you said not to set this value overboard in this question ) ? Where it will make a problem ?

regards & thanks
pjp

OPEN_CURSORS parameter - Ask TOM (1)

January 29, 2005 - 8:57 am UTC

q1) it'll be at least one more than your applications actually use.

Meaning, you need to look to your applications to answer this.

q2) It'll allocate an array of 1,000,000 cursor slots at connect time (memory). It'll let a buggy application leak cursors like mad for a long time before blowing up (eating ram, consuming resources).

where wouldn't it make a problem would be a better question

OPEN_CURSORS

Suraj Sharma, May 22, 2008 - 5:41 am UTC

Tom,

Quite confusing!!!

On one hand you are saying "It should be noted that OPEN_CURSORS simply allocates a fixed number of slots but does not allocate memory for these slots for a client"

On the other hand:

¿q2) It'll allocate an array of 1,000,000 cursor slots at connect time (memory). It'll let a buggy application leak cursors like mad for a long time before blowing up (eating ram, consuming resources).¿

Please explain the same.

Suraj Sharma

OPEN_CURSORS parameter - Ask TOM (2)

May 22, 2008 - 7:17 am UTC

what do you mean by "on the other hand", I see two statements that say the same thing

a) "simply allocates a fixed number of slots" - eg: allocates an array

b) "it'll allocate an array of 1,000,000 cursor slots" - eg: allocates an array

do you see they say the same thing?

RE:OPEN_CURSORS

Suraj Sharma, May 22, 2008 - 8:38 am UTC

My apology for not being clear in this:

I was actually talking about memory allocation. On one statement you said that " OPEN_CURSORS simply allocates a fixed number of
slots but does not allocate memory for these slots for a client" ON THE OTHER HAND "It'll allocate an array of 1,000,000 cursor slots at connect time (memory). It'll let a buggy
application leak cursors like mad for a long time before blowing up (eating ram, consuming resources)."

I am sorry if I could not understand this properly.

OPEN_CURSORS parameter - Ask TOM (3)

May 23, 2008 - 7:56 am UTC

do you understand how much memory an array with 1,000,000 slots would consume.

it would consume at least 1,000,000 bytes of storage and if it were an array of pointers - between 4,000,000 and 8,000,000 bytes of storage. If it were an array of a more complex structure - it would consume even more.

1,000,000 of ANYTHING is big.

we allocate a fixed sized array of something. If you set open cursors to a reasonable number, this is not a problem. If you set it to a wildly high number - well - think about it...

open cursors

Jay, September 30, 2010 - 1:01 am UTC

Hi Tom,
Does this parameter have an impact on performance? If we set it too small, Oracle may throw an error when an application tries to open too many cursors. If we set it too high, it will let buggy applications get away with not managing cursors properly.
I have this doubt because I am trying to find out why a file generation program (extract dta from Oracle db) written in c++ is taking a few minutes on one machine and an hour on another. The same db dump was applied on both machines. So data content, structures are same. Both machines have same configuration (RAM, CPU)etc. On comparing the parameters, open_cursors is 1000 on one and 2000 on the other. Would that cause a performance difference?

OPEN_CURSORS parameter - Ask TOM (4)

September 30, 2010 - 7:30 am UTC

the down side of setting large will be increased client and server memory usage (eery cursor you have opened takes memory) and possibly increased cursor opening time as we have more slots to look through to find an empty one.

1000 to 2000 would not cause "hours of difference"

run the application with dbms_monitoring on (with wait event tracing) and tkprof the results. You will discover instantly "what is different" - if anything - at the database level by comparing those reports.

OPEN CURSOR

KHURSHEED ALAM KHAN, March 02, 2012 - 4:47 am UTC

Dear TOM,

I also got the same error when I run one JAVA based application which make huge updates and insertions in database.

I checked the default cursor value as follow:

sql>Sho parameter open_cursors;

It is displayed as 300

I have change the parameter using the below query:

alter system set open_cursors=500 scope=both;

system altered.

The value is changed but I am facing the same error:

Open cursor exceeds.

Please suggest me on this.I will thankful to you.

Thanks

OPEN_CURSORS parameter - Ask TOM (5)

March 02, 2012 - 5:48 am UTC

you are leaking cursors, your program has a serious bug. Your program is almost certainly corrupting data in the database.

Here is what I think is happening (99.99999999999% sure on this, I see it so many times....)

you open a cursor
you hit an error
you fly over the code that would have closed the cursor
your exception block HIDES the error (you are swallowing exceptions - google up that term and read and read and read about it)
you return from your method - and no one knows that you failed at your task

you just leaked a cursor, you cannot reach it anymore, it is out of scope.

While your program is running, query v$open_cursor every now and then and display all of the duplicate sql your session has open - that'll give you a clue where the problem is in your code.

And then remove all of your exception blocks that swallow exceptions so that your program just DIES with unhandled exceptions (that is something you should do, just let it DIE) - or fix them to

a) release resources
b) re-raise the exception
c) die

You cannot survive exceptions when you have no clue what they are about.

Open Cursors in 11g

carsten, March 02, 2012 - 6:35 am UTC

Actually the java 11 drivers do not actually close a cursor on serverside if you does that on the client.
It seems that Oracle has choosen to fix the cursor reuse problem on the driver side. Our application now requires well over 1000 open cursors as we have this many different statements overall.
So prepare the server resources for your needs is what I found as suggestion.

OPEN_CURSORS parameter - Ask TOM (6)

March 02, 2012 - 6:50 am UTC

documentation, bug or metalink note number please.

It sounds like you might be saying that they have enabled statement caching by default - but that would be a simple thing to turn off and/or configure to cache a smaller number.

Impact of High value open_cursors and processes?

Rohit, January 19, 2015 - 12:59 pm UTC

Hi,

We have just upgraded Oracle from version from 11.2.0.2 to 11.2.0.4.
As part of upgrade the values of few parameters got changed.
Parameter Name Post Prior to upgrade
----------------------------------------------------
optimizer_secure_view_merging ->FALSE -> TRUE
open_cursors ->1500 ->500
session_cached_cursors ->300 ->50
job_queue_processes ->128 ->32
processes ->800 ->300
_cursor_features_enabled ->MISSING ->10

Now one of our processes which use Oracle Queues, has got performance degradation.
But now when we change values of few parameters back to the original one i.e. previous version, the process delivers as per SLA. The following parameters are impacting the process

1. Without setting value of _cursor_features_enabled as 10, it doesn’t work i.e response is very slow. So this has become must for us.

2. Either of following combinations work
->a. Processes = 800 and open_cursors = 500
->b. Processes = 1500 and open_cursors = 300
Regarding _cursor_features_enabled, perhaps there was one bug in Oracle. As solution of that a patch along with setting some value of this parameter solves the issue.

Could you help me in understanding how this change is impacting performance?
• Reducing value of process to 800 from 1500
• Reducing value of open_cursors to 300 from 500

Apologies for typos.

Regards,
Rohit

OPEN_CURSORS parameter - Ask TOM (2024)
Top Articles
South Jordan Vasa Class Schedule
Culver's Rib Mountain Flavor Of The Day
Kmart near me - Perth, WA
Zabor Funeral Home Inc
Brady Hughes Justified
The Definitive Great Buildings Guide - Forge Of Empires Tips
Crocodile Tears - Quest
The Potter Enterprise from Coudersport, Pennsylvania
Zitobox 5000 Free Coins 2023
Fusion
Spelunking The Den Wow
Capitulo 2B Answers Page 40
Slushy Beer Strain
6001 Canadian Ct Orlando Fl
Think Up Elar Level 5 Answer Key Pdf
Gmail Psu
Dexter Gomovies
Mineral Wells Independent School District
Bfg Straap Dead Photo Graphic
My.tcctrack
Divina Rapsing
Airrack hiring Associate Producer in Los Angeles, CA | LinkedIn
Noaa Duluth Mn
Craigslist Personals Jonesboro
Where to eat: the 50 best restaurants in Freiburg im Breisgau
yuba-sutter apartments / housing for rent - craigslist
Play Tetris Mind Bender
Vivaciousveteran
Essence Healthcare Otc 2023 Catalog
My Reading Manga Gay
Possum Exam Fallout 76
Craftsman Yt3000 Oil Capacity
Tripcheck Oregon Map
Ringcentral Background
R/Sandiego
Lichen - 1.17.0 - Gemsbok! Antler Windchimes! Shoji Screens!
Planet Fitness Lebanon Nh
Bbc Gahuzamiryango Live
Spn-523318
Craigslist Pets Plattsburgh Ny
Hireright Applicant Center Login
Gamestop Store Manager Pay
Funkin' on the Heights
Dagelijkse hooikoortsradar: deze pollen zitten nu in de lucht
Identogo Manahawkin
Every Type of Sentinel in the Marvel Universe
What Time Do Papa John's Pizza Close
Product Test Drive: Garnier BB Cream vs. Garnier BB Cream For Combo/Oily Skin
Treatise On Jewelcrafting
Free Carnival-themed Google Slides & PowerPoint templates
Provincial Freeman (Toronto and Chatham, ON: Mary Ann Shadd Cary (October 9, 1823 – June 5, 1893)), November 3, 1855, p. 1
Latest Posts
Article information

Author: Nathanael Baumbach

Last Updated:

Views: 6196

Rating: 4.4 / 5 (75 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Nathanael Baumbach

Birthday: 1998-12-02

Address: Apt. 829 751 Glover View, West Orlando, IN 22436

Phone: +901025288581

Job: Internal IT Coordinator

Hobby: Gunsmithing, Motor sports, Flying, Skiing, Hooping, Lego building, Ice skating

Introduction: My name is Nathanael Baumbach, I am a fantastic, nice, victorious, brave, healthy, cute, glorious person who loves writing and wants to share my knowledge and understanding with you.