GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 143 of 241    Print  
What is mutatinig trigger? How do you avoid mutating trigger?

  
Total Answers and Comments: 7 Last Update: March 15, 2007     Asked by: koteshwar t 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: madhavi guthula
 
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.

Above answer was rated as good by the following members:
kperumal75
January 08, 2007 05:12:34   #1  
       

RE: What is mutatinig trigger? How do you avoid mutati...

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


 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
January 09, 2007 07:52:47   #2  
kashinathn Member Since: June 2006   Contribution: 4    

RE: What is mutatinig trigger? How do you avoid mutati...
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.
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
February 08, 2007 01:52:49   #3  
harsh        

RE: What is mutatinig trigger? How do you avoid mutati...
It is avoided by using views or plsql tables...
 
Is this answer useful? Yes | No
February 09, 2007 17:23:19   #4  
geetha24 Member Since: March 2006   Contribution: 27    

RE: What is mutatinig trigger? How do you avoid mutati...
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.
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
February 28, 2007 07:04:01   #5  
madhavi guthula        

RE: What is mutatinig trigger? How do you avoid mutati...
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.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
March 07, 2007 01:25:28   #6  
Nikhil_4_Oracle        

RE: What is mutatinig trigger? How do you avoid mutati...



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




 
Is this answer useful? Yes | No
March 15, 2007 08:05:51   #7  
subramanian,sp        

RE: What is mutatinig trigger? How do you avoid mutati...
You can avoid mutating trigger by using autonomous transaction.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape