ocm吧 关注:1,546贴子:1,609
  • 0回复贴,共1

ORA-02030解决办法

只看楼主收藏回复

平时需要给一些Oracle用户赋予动态性能视图的查询权限,今天碰到的问题如下:

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;
。。。。。。。。


1楼2014-02-14 10:18回复