"data manipulation operation not legal on this view" happening in a user table

An alternative answer: I came across this error when I tried to INSERT a record into a materialized view table.


First thing: are you really sure it is a table? From the way you have framed the question it might be that the user experiencing this problem doesn't own the table. In which case, perhaps there's a synonym or something which is really pointing at a view.

Second thing it might be, is if there's a trigger on the table and it is the action it fires causing the problem.


I would activate SQL tracing and try the insert again, then look at the trace file to determine exactly what SQL statement is causing the error.

If, as suggested by others, it is SQL executed by a trigger against some other object, you'll see that in the trace as recursive SQL and it will be clear what object is involved.

If there is no recursive SQL in the trace, then it is likely that you are not accessing the object you think you are, and the trace should show the actual object ID being used, which you can check against the data dictionary.

If it really is just a table, and there is no recursive SQL involved, then it sounds like you have a case for Oracle support.

Tags:

Oracle