Open_Cursors Parametro from init.ora

DBA Geral (instalação, configuração do banco, scripts do Sql*Plus, shell scripts, batch scripts, etc...)
Post Reply
Amora Doce
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 4
Joined: Mon, 20 Aug 2007 6:03 pm
Location: RJ

Hello everyone, can anyone save me?

What is this parameter? What is it for? Why give this error?

Select all

ORA-01000: maximum open cursors exceeded
Each trigger opens a cursor, but how does it close?

Thanks,
Amora
User avatar
dr_gori
Moderador
Moderador
Posts: 5026
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

Oracle has a maximum number of open cursors at the same time. This is defined exactly in INIT.ORA

If you use cursor FOR...LOOP the cursor's "closing" is automatic!
If you use OPEN CURSOR you must close it with close cursor.

Maybe the cursors are not being closed, so this problem occurs.

I like to open cursor only when it is really necessary. I'vê seen codes that open cursor until you do a select from dual I do not see the need in it.
Amora Doce
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 4
Joined: Mon, 20 Aug 2007 6:03 pm
Location: RJ

Thank you Dr_Gori,

I found an interesting article about Open_Cursors:
http://orafaq.com/node/758.
Embrace,



99] Umora
User avatar
Porva
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 342
Joined: Mon, 29 Jan 2007 7:36 am
Location: São Paulo/SP
Rafael S. Nunes
São Paulo/SP

I liked Nick! : D
rodfbar
Rank: DBA Pleno
Rank: DBA Pleno
Posts: 241
Joined: Tue, 09 Oct 2007 11:15 am
Location: Batatais - SP

Good morning people

Taking advantage of the topic would like to know in terms of Performace which would be best to use?

Select all

open cursor .. fetch .. close
or

Select all

for rec in (select... ) loop
or still if they have any other practice ...

Another problem that I am Facing is that it has an application running in Forms 6i with bank 9i,

happens that gave the error of

Select all

maximum open cursors exceded
I went to give a Select in the Table v$open_cursor for the SID we were monitoring

The same brought SQL_Text with Into (SELECT Field Into Variavel), does the bank considers this type of select as a cursor ???

In the results returned from the view v$open_cursor they also traimed what would be the select of table-based blocks ..

would have any form or tips for Correct these programming bugs not to give more the error I mentioned ??
User avatar
dr_gori
Moderador
Moderador
Posts: 5026
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

Taking advantage of the topic I would like to know in terms of Performace which would be best to use
I have read several topics from Guru Tom Kyte about it and he always prefers implicit cursor. (It's less code, easier to understand and never forget to close when finished).
rodfbar
Rank: DBA Pleno
Rank: DBA Pleno
Posts: 241
Joined: Tue, 09 Oct 2007 11:15 am
Location: Batatais - SP

Right ...
Thanks for the help ....

Another question that I have is as I said in the view v$open_cursor returns me even queyes that I perform internally in the Program select into

These queryes also help to burst the maximum number of open cursors in the bank ???

For if it is returning in this view I interpret that the bank considered Query as an open cursor
Am I right?
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest