ORA-02030 WHEN GRANTING SELECT ON V$ VIEW
来源:互联网 发布:流星搜剑录激活码淘宝 编辑:程序博客网 时间:2024/05/20 19:49
When you grant v$session on select to normal user,you will receive:ORA-02030: can only select from fixed tables/views
e.g.
SQL> connsys/oracle@devdb1as sysdba
Connected.
SQL> create user leiz identified by leiz default tablespace data01;
User created.
SQL> grant connect, resource,create synonym to leiz;
Grant succeeded.
SQL> grant select on v$session to leiz;
grant select on v$session to leiz
ERROR at line 1:
ORA-02030: can only select from fixed tables/views
Reason:
The actual view created on the dynamic performance table is named V_$(view name). The V$(view name) is only a synonym and not an actual fixed table or a view.
SQL> select OWNER, OBJECT_TYPE,OBJECT_NAME
from dba_objects
where object_name in ('V$SESSION','V_$SESSION');
OWNER OBJECT_TYPE OBJECT_NAME
---------- -------------------- --------------------
SYS VIEW V_$SESSION
PUBLIC SYNONYM V$SESSION
SQL> select * from v$fixed_view_definition c
e.g.
SQL> connsys/oracle@devdb1as sysdba
Connected.
SQL> create user leiz identified by leiz default tablespace data01;
User created.
SQL> grant connect, resource,create synonym to leiz;
Grant succeeded.
SQL> grant select on v$session to leiz;
grant select on v$session to leiz
ERROR at line 1:
ORA-02030: can only select from fixed tables/views
Reason:
The actual view created on the dynamic performance table is named V_$(view name). The V$(view name) is only a synonym and not an actual fixed table or a view.
SQL> select OWNER, OBJECT_TYPE,OBJECT_NAME
from dba_objects
where object_name in ('V$SESSION','V_$SESSION');
OWNER OBJECT_TYPE OBJECT_NAME
---------- -------------------- --------------------
SYS VIEW V_$SESSION
PUBLIC SYNONYM V$SESSION
SQL> select * from v$fixed_view_definition c
Solution:
Granting select on the underlying V_$ view instead of the V$ synonym will allow you to grant select on the object.
SQL>grant select on v_$session to leiz;
Grant succeeded.(sys user)
SQL> connleiz/leiz@devdb1
Connected.
SQL> select count(*) from sys.v_$session;
COUNT(*)
----------
33
SQL> create synonym v$session for sys.v_$session;
Synonym created.
SQL> select count(*) from v$session;
COUNT(*)
----------
33
- ORA-02030 WHEN GRANTING SELECT ON V$ VIEW
- Ora-08181 When Select Scn_to_timestamp(Ora_rowscn)
- How to resolve ORA-19706 error when select from dblink
- 检查v$instance时出现 ORA-01012: not logged on
- User has no SELECT privilege on V$SESSION
- v-on
- v-on
- Low performance or ORA-1220 for query on V$ARCHIVE_GAP on 11.2.0.4 or later release
- Ora-12520 12516 Ora-12520 12516 Received When Listener on Node 1 is Down in RAC Setup
- Oracle expdp 报错: ORA-39125 ORA-4063 on View SYS.KU$_CLUSTER_VIEW 解决方法
- SQL:select case when
- SQL:Select Case When
- select case when
- Oracle select case when
- Error “You must not call setTag() on a view Glide is targeting” when use Glide
- User has no SELECT privilege on V$SESSION(执行计划相关)
- v-bind和v-on
- learning v$ view-v$session
- Android应用开发揭秘的第3个程序3_2_Content_Provider修改版和高仿版的源码注释
- 2012/11/5——2012/11/9 周记
- ORA-38856: Cannot mark instance UNNAMED_INSTANCE_2 (redo thread 2) as enabled
- )RGB排序,一个字符串,里面只有三种字符R G B,所有的R都在G的前面,所有的G都在B的前面。将给定字符串按照此规律排序。要求不允许用辅助空间,复杂度控制在O(N)。遍历一遍就排好序。
- 如何注册 MSDN AA
- ORA-02030 WHEN GRANTING SELECT ON V$ VIEW
- ios 状态栏 覆盖自定义View
- expdp/impdp 详细参数解释
- 复杂多目录的Makefile模板及示例
- unsigned int与int相加的问题
- 开发记事
- 【说说网络流的那些事】网络流基础知识Ver0.1(算法篇)
- 让记事本默认以Unicode或UTF-8编码保存避免ANSI乱码的方法技巧
- 选择文件时,选多个文件