Re: open_cursor count keeps growing

From: Sybrand Bakker <gooiditweg_at_nospam.demon.nl>
Date: Thu, 15 Sep 2005 20:59:19 +0200
Message-ID: <rrgji117aafvhangvpf4f6irvbpj4igtme_at_4ax.com>


On 15 Sep 2005 11:28:21 -0700, "Moe" <mwahidi_at_emanagelaw.com> wrote:

>Is this how oracle behaves? . Should the open cursor count drop when
>the sql command is done executing?
>Im doing select * from v$open_cursor to check count and it seems that
>this does not tell me what cursors are being used. Any suggestions?

The cursor count shouldn't necessarily drop as Oracle can hold and reopen cursors. However, especially if you are using the lower levels of interaction like Pro*C, and OCI, it is up to you whether you hold or release cursors.
Also be aware the open_cursor parameter is a *per session* limit, not a database wide limit. As far as I'm concerned, if the open_cursor parameter is 1000, and the users are still hitting ora-1000 maximum open cursors exceeded, there is something wrong in the application. Also be aware cursors opened by dbms_sql are not automatically closed.

I have a script to differentiate between used and un-used cursors. I got this from Metalink, the Oracle Support Site. I currently can't access it.

--
Sybrand Bakker, Senior Oracle DBA
Received on Thu Sep 15 2005 - 20:59:19 CEST

Original text of this message