平时需要给一些用户赋予动态性能视图的查询权限,今天碰到的问题如下:
SQL> conn / as sysdba
Connected.
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
可以查看相对的表名是什么,赋予权限后就可以了。
SQL> select synonym_name,table_name from dba_synonyms where synonym_name='V$SESSION';
SYNONYM_NAME TABLE_NAME
------------------------------ ------------------------------
V$SESSION V_$SESSION
SQL> GRANT SELECT ON V_$SESSION TO HR;
Grant succeeded.
SQL> CONN HR/HR
Connected.
SQL> DESC V$SESSION;
。。。。。。。。
阅读(1180) | 评论(0) | 转发(0) |