top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are mutating triggers?

+1 vote
450 views
What are mutating triggers?
posted Dec 12, 2014 by Archana

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

In Oracle triggers that run implicitly when an INSERT, UPDATE, or DELETE statement is issued against the associated table or, in some cases, against a view, or when database system actions occur. These procedures can be written in PL/SQL or Java and stored in the database, or they can be written as C callouts.

Mutating trigger is trigger that is currently being modified by DML opertion. we can resolve it by applying statement lelel trigger.

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.

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.

answer Dec 12, 2014 by Kali Mishra
...