By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,501 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,501 IT Pros & Developers. It's quick & easy.

Open cursors

P: n/a
Not sure if this is more a .Net question or an Oracle question but
hey...

I have an OracleConnection object in C# that I'm passing around a lot
of other objects in sequence. This way one connection is used for all
objects and its basically saying "perform your job on this
connection". However, despite the fact that I'm closing the connection
when eahc object is finished with it, the cursors which it opens in
the database seem to stay around for quite some time, only
disappearing when I shut the application down. How can I ensure that i
don't get to the stage that the open_cursors variable is exceeded? Is
there a way of saying ordering a connection to close all cursors
associated with what it just did?

Ta,
SSM
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Steve Morrell" <St***********@techprt.co.uk> wrote in message
news:3d***********************@posting.google.com. ..
Not sure if this is more a .Net question or an Oracle question but
hey...

I have an OracleConnection object in C# that I'm passing around a lot
of other objects in sequence. This way one connection is used for all
objects and its basically saying "perform your job on this
connection". However, despite the fact that I'm closing the connection
when eahc object is finished with it, the cursors which it opens in
the database seem to stay around for quite some time, only
disappearing when I shut the application down. How can I ensure that i
don't get to the stage that the open_cursors variable is exceeded? Is
there a way of saying ordering a connection to close all cursors
associated with what it just did?

Ta,
SSM


Not familiar with C#. Why one would close the connection once each object
is done is a mystery to me. Unless there is some sort of connection pooling
then you are building up and tearing down a connection (an expansive thing
to do) all the time. If you are connection pooling then that is a different
matter. It sounds like your application is leaking cursors. The easy way
is to close each cursor when you are done. The better way is to not open the
cursor if it is already open and just reuse it. (See Oracle's application
developer's Guide)

Jim
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.