So here it is: a user is getting a run-time error ORA-01031: insufficient privileges when accessing his view.
The view is based on his own objects and a lookup to the dynamic performance view V$DATABASE.
Example:
connect scott/tiger
CREATE VIEW MYVIEW AS
SELECT
FROM MYTABLE MT,
V$DATABASE DB
WHERE....
AND... ;
If the user has only SELECT ANY TABLE, Oracle will return runtime error ORA-01031 when the view is compiled.
However, if you give user scott the SELECT privilege on the table directly:
GRANT SELECT ON V_$DATABASE TO SCOTT;
then Oracles rules for object creation is honored and the runtime error will disappear.
No comments:
Post a Comment