Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Mutating table problem + open cursors

Mutating table problem + open cursors

From: Henri van den Bulk <hvdbulk_at_lgc.com>
Date: 1997/02/11
Message-ID: <3300ED29.31DF@lgc.com>#1/1

Hi,

We have been having problems with mutating table errors. The senario is that we have a table
that contains parent-child relatied rows. For example row 1 can be the parent for row 3. The entity is such that we need this relationship back to the same entity.

To inforce RI in the db we create a trigger that on delete of row would delete all the child rows in the same entity. Of course this cause a mutating table error.
Now I found an article that advised to write a trigger that records the fact that a row
has been deleted (after delete for each row trigger). This trigger writes the the SK into a temp. table. Then after the delete (after delete on entiry trigger) an other trigger fires and deletes the child rows that are assosiated to the rows that have been recorded in the temp. table.

The problem that we're seeing now is that the db. generates an error stating that it has exceeded the max open cursors "ORA-01000: maximum open cursors exceeded". This is
weird because it is set to 150 in init.ora and there are only 6 rows in the database.

Any suggestions?

-- 
 Henri M.B. van den Bulk       
 Landmark Graphics Corp.,               
 Drilling & Well Services Product Group
Received on Tue Feb 11 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US