Re: trigger- problem: too many open cursors

From: jgar the jorrible <>
Date: Thu, 2 Apr 2009 11:40:31 -0700 (PDT)
Message-ID: <>

On Apr 2, 4:46 am, Andreas Mosmann <> wrote:
> ddf schrieb am 01.04.2009 in
> <>:
> > On Apr 1, 7:00 am, Andreas Mosmann <
> >> wrote:
> > I doubt that there is a mistake, except in the concept that all
> > cursors are explicit cursors you've coded.  Oracle can open additional
> Could you explain this?
> What happens, if I f.e. execute an update on this Table Table1, that
> concerns 1000 rows. Will there be created 1000 Cursors? And if so, what
> part of my code makes this happen? How can I avoid this?

Depends on your coding. If you don't want to use simple tools, look into tracing to see exactly what is going on. See metalink Note: 39817.1 for example.

> > cursors to aid in processing your query, and it appears that at times
> > you have a heavier than 'normal' user load consuming the cursors your
> > trigger normally uses.
> > I suggest you increase the value of the open_cursors parameter; you
> > can double this value and it won't affect memory until these cursors
> > are needed.
> I can increase this value, but in fact I still do not understand where
> these open cursors come from.

There is something to be said for David's "up open_cursors and be done with it" approach, and something to be said for figuring out what is really going on. It is entirely possible something non-obvious is happening with your code that should be fixed. Nothing obvious jumped out at me in the code you posted, but I'm not particularly good at seeing those things. I'm hypothesizing your encodexml is requiring a hard parse and new cursor for each changed row, that should stand out when you look at the session cursors with any of the displays or tracing. Looks like you are using bind variables properly so it shouldn't do that, but... you have to look and see.

It's also possible the cursor security enhancements for 11g have some sort of bug or feature that impacts this. Also wondering about bug 8328200 in tracing...


-- is bogus.
Received on Thu Apr 02 2009 - 13:40:31 CDT

Original text of this message