Re: can not delete data from a table which is queried in a stored procedure

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel Roy

    Re: can not delete data from a table which is queried in a stored procedure

    From Oracle:

    ORA-04091 table string.string is mutating, trigger/function may not
    see it

    Cause: A trigger (or a user defined PL/SQL function that is referenced
    in this statement) attempted to look at (or modify) a table that was
    in the middle of being modified by the statement which fired it.

    Action: Rewrite the trigger (or function) so it does not read that
    table.

    Look in v$lock for any lock on that table. Is the issue still there
    after you bounced the database?

    Daniel
    Hi, folks,
    >
    Here is my example of problem,
    >
    I have a table called node_tab. The other two tables: edge_tab,
    polyline_tab has foreign key constraints ( cascade on delete) relying
    on node_tab.
    >
    In one stored procedure, I have a very simple query working on
    node_tab to return
    coordinates of node.
    >
    When I try to delete any row from node_tab, I got error message as
    following:
    >
    The headache is when I delete any record from my node table, the
    system returns the following error:
    ORA-04091: table NODE_tab is mutating, trigger/function may not see it
    ORA-06512: at "GEOMETRY_MAP.G ETTER_PAK", line 112
    ORA-06512: at "GEOMETRY_MAP.G ETTER_PAK", line 143
    >
    Then I tried to delete all foreign keys relying on it. It still has
    the same problem. I don't have any trigger in node_tab.
    >
    I could not understand what happened to me? Is any idea to help me
    out?
Working...