'ORA-01031: insufficient privileges' error received when inserting into a View

Posted by Patrick K on Stack Overflow See other posts from Stack Overflow or by Patrick K
Published on 2010-06-02T19:39:34Z Indexed on 2010/06/02 19:44 UTC
Read the original article Hit count: 601

Filed under:

Under the user name 'MY_ADMIN', I have successfully created a table called 'NOTIFICATIONS' and a view called 'V_NOTIFICATIONS'. On the 'V_NOTIFICATIONS' view I have successfully created a trigger and a package that takes what the user attempts to insert into the view and inserts it into the table. The 'V_NOTIFICATIONS' trigger and package also perform the update and delete functions on the table when the user attempts to perform the update and delete functions on the view.

I have done this with many views in the project I am currently working on, as many views sit over the top of many different tables, however when attempting to insert a record into this view I receive an 'ORA-01031: insufficient privileges' error.

I am able to insert directly into the table using the same code that is in the package, but not into the view. Any help on this would be greatly appreciated.

© Stack Overflow or respective owner

Related posts about Oracle

Related posts about insert