469,322 Members | 1,084 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,322 developers. It's quick & easy.

Mutation table

kiss07
99
Dear daba,

Also,

WHAT IS Mutating table and what is mutating trigger?How can i
eliminate mutating trigger error?


Pls .I preparing interview. Pls some coding.

Arun..
May 3 '07 #1
5 9175
debasisdas
8,127 Expert 4TB
The Oracle mutating trigger error occurs when a trigger references the table that owns the trigger.
so we ususlly get the error
ORA-04091: table name is mutating, trigger/function may not see it.

There are several causes of mutating tables, but in general a table mutation error will result if you create a trigger on a table that attempts to examine the current table. Also, the error is given when an attempt is made to examine a parent table in a cascading update/delete.
May 3 '07 #2
debasisdas
8,127 Expert 4TB
To avoid the situation u can follow these methods.

Don't use triggers - The best way to avoid the mutating table error is not to use triggers. Most of the PL/SQL developers avoid triggers unless absolutely necessary.

Use an "after" trigger - If you must use a trigger, it's best to avoid the mutating table error by using an "after" trigger, to avoid the currency issues associated with a mutating table. For example, using a trigger ":after update on xxx", the original update has completed and the table will not be mutating.

Use autonomous transactions - You can avoid the mutating table error by marking your trigger as an autonomous transaction, making it independent from the table that calls the procedure.
May 3 '07 #3
debasisdas
8,127 Expert 4TB
For further details please follow the

link

Hope that will help u.
May 3 '07 #4
kiss07
99
Dear deba,

Fine and thnx..

Arun..
May 3 '07 #5
debasisdas
8,127 Expert 4TB
Dear Arun

You are welcome to post more in the forum.
May 4 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

15 posts views Thread by Xah Lee | last post: by
4 posts views Thread by Werner Partner | last post: by
7 posts views Thread by Kamal | last post: by
14 posts views Thread by Hendrik van Rooyen | last post: by
5 posts views Thread by jrod11 | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.