ITPub博客

首页 > IT基础架构 > 网络安全 > How to grant on v$ views

How to grant on v$ views

原创 网络安全 作者:liang573728 时间:2019-02-28 17:57:06 0 删除 编辑
Today i was faced with an error when I try to give permission on a v$view[@more@]

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

I wonder why i couldn’t give select privilage to a v$ view. I tried to give to permission to another v$ views but the error was same. Action for this error on error codes manual was meaningless to me (Action: You may only select rows from fixed tables/views.)

From a little googling effort i saw that the problem is caused because of trying to give select privilage 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 give it like below

SQL> grant select on v_$session to hr;

Grant succeeded.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/640706/viewspace-1043870/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: sqlldr的用法总结
请登录后发表评论 登录
全部评论

注册时间:2005-10-15

  • 博文量
    152
  • 访问量
    138341