What is mutatinig trigger? How do you avoid mutating trigger?

Showing Answers 1 - 23 of 23 Answers

Guest

  • Jan 8th, 2007
 

when theres a deadlock within multiple DML Triggers.

ex: when a a trigger has got mutiple DML statements and if a statement A tries to modify and row which statement B had already modified hence this mutating erros occures

  Was this answer useful?  Yes

kashinathn

  • Jan 9th, 2007
 

The basic reason for this error is the way Oracle manages a read consistent view of data. The error is encountered when a row-level trigger accesses the same table on which it is based, while executing. The table is said to be mutating.

  Was this answer useful?  Yes

harsh

  • Feb 8th, 2007
 

It is avoided by using views or plsql tables...

  Was this answer useful?  Yes

Say for exampleThere is a before insert row level trigger T1 on the table empInside the trigger if you give Select Count(*) from Emp, then mutating table error will be raised. This is because you are trying to access the emp that is being updated by the same trigger. In the same example if you change row level to statement this error will not be raised.

  Was this answer useful?  Yes

madhavi guthula

  • Feb 28th, 2007
 

A table which is being updated is a mutating table, performing any DML operations or querying on a mutating table leads to a mutating error. This can be possible in triggers or in funtions that are used in expressions.

Nikhil_4_Oracle

  • Mar 7th, 2007
 



Hey All,

Don`t go into therotical more...

Mutating Trigger is very simple,


see you have row level trigger on table with before/after timing, now in you


trigger defination if you have query(DML) on the same table on which trigger is


Based , then there is Mutating of Trigger Error. Since oracle can`t proccess


same table @ same time for two diff task.


thats all,


Bye.............


Nikhil.  - i-flex



  Was this answer useful?  Yes

subramanian,sp

  • Mar 15th, 2007
 

You can avoid mutating trigger by using autonomous transaction.

Baji Shaik

  • Jun 5th, 2011
 

the  row level trigger based on a table,the trigger body can't read thedata  from same table, if you are trying to this it gives mutating error

to avoid that you must use statement level trigger

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions