Face with an error ORA-02030 when you try to give permission on a v$ view
SQL> grant select on v$session to hr;
grant select on v$session to hr
*
ERROR at line 1:
ORA-02030: can only select from fixed tables/views
Why it couldn’t give select privileges to a v$ view. If you tried to give permission to other v$views you will face same the error.
The problem is caused because of trying to give select privileges on a synonym. Oracle v$ views are named V_$VIEWNAME and they have synonyms in format V$VIEWNAME and you can’t give privilage on a synonym.
If you want to give permission to a V$ view you must grant permissions like below:
SQL> grant select on v_$session to hr;
Grant succeeded.
No comments:
Post a Comment