GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 65 of 155    Print  
What is mutating trigger? How do you resolve it?
If a trigger body is trying to update dependent tables, will it get a mutating error?

  
Total Answers and Comments: 6 Last Update: May 08, 2007     Asked by: be17be 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Robert
 

To avoid Mutating trigger there are many ways. One of the best approach is to make use of the after trigger which clearly takes care of concurrency problems associated with mutating triggers .When after trigger is used only after the process of current updating is finished the next process gets processed.



Above answer was rated as good by the following members:
swaprath
December 03, 2006 14:20:11   #1  
PAWAN AHUJA        

RE: What is mutating trigger? How do you resolve it?

Mutating trigger is trigger that is currently being modified by DML opertion.

we can resolve it by applying statement lelel trigger.

Regards

Pawan Ahuja


 
Is this answer useful? Yes | No
December 08, 2006 02:34:10   #2  
manikandan        

RE: What is mutating trigger? How do you resolve it?

if the trigger attempts to select or modify the table while the trigger has not completed (ie. table is in transition). then mutating trigger error occurs.

 because the table is in middle of a transaction so it causes the trigger to mutate.

you can change the trigger to statement level and apply the logic there.


 
Is this answer useful? Yes | No
January 30, 2007 00:19:43   #3  
vikramssheth Member Since: January 2007   Contribution: 1    

RE: What is mutating trigger? How do you resolve it?
We can override this problem using temporary Table Concept.
 
Is this answer useful? Yes | No
May 08, 2007 16:28:20   #4  
sripri Member Since: July 2006   Contribution: 198    

RE: What is mutating trigger? How do you resolve it?

Mutating trigger has similar concept to that of deadlock. When a table is in the half way of executing a transaction and is the owner of a trigger and if the same table is accessed by the trigger somewhere else in the same time then at that instance mutating trigger occurs.


 
Is this answer useful? Yes | No
May 08, 2007 16:41:42   #5  
Robert Member Since: July 2006   Contribution: 91    

RE: What is mutating trigger? How do you resolve it?

To avoid Mutating trigger there are many ways. One of the best approach is to make use of the after trigger which clearly takes care of concurrency problems associated with mutating triggers .When after trigger is used only after the process of current updating is finished the next process gets processed.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
May 08, 2007 16:48:28   #6  
RajivPrasad Member Since: September 2006   Contribution: 85    

RE: What is mutating trigger? How do you resolve it?

If a trigger body is trying to update dependent tables the best approach in this case to avoid mutating trigger errors would be to make the transactions independent and not associated with triggers which is technically called as autonomous transactions.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape