ORA-02030 WHEN GRANTING SELECT ON V$ VIEW
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> conn sys/oracle@devdb1 as 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> conn leiz/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
:
1061103.6
Type:
PROBLEM
Modified Date :
24-OCT-2007
Status:
PUBLISHED
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9252210/viewspace-600661/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORACLE CASE WHEN 及 SELECT CASE WHEN的用法Oracle
- ORA-02030: can only select from fixed tables/viewsView
- sql server select case when的用法SQLServer
- Unable to View Chinese Font When Using Tools>Copy FileView
- 【BUG】ORA-00600 [17147] ORA-48216 When Querying V$DIAG_ALERT_EXT ViewView
- v_user_viewView
- v$asm 相關的viewASMView
- 【DOC】VIEW: "V$LOCK" Reference NoteView
- How to resolve ORA-19706 error when select from dblinkError
- ORA-02030的解決
- 多View統一Camera v1.2View
- ORA-02030問題解決方法
- Tutor13 How to crack Drag And View v4.50View
- Oracle Case WhenOracle
- SQL Case WhenSQL
- When to Partition a Table
- 在ASP.NET MVC中使用Knockout實踐02,組合View Model成員、Select繫結、通過構造器建立View Model,擴充套件View Model方法ASP.NETMVCView套件
- input,select, v-model 繫結的值為數字型別型別
- mysql case when then 使用MySql
- When you're goneGo
- 【偵聽】V$session.server = none when using Shared Server/MTS ConfigurationSessionServerNone
- select 下拉框用 Select select = new Select (element) 方法失敗
- from v * ERROR at line 1: ORA-00942: table or view does not existErrorView
- oracle11g v$檢視view與字典dictionary官方連結OracleView
- Oracle的order by case whenOracle
- sql when null 判斷SQLNull
- Case when 支援變數變數
- case when遇上null值Null
- select for update_v$lock_dml小測試(鎖型別及模式)型別模式
- 【我的Android進階之旅】解決重寫onTouch事件提示的警告:onTouch should call View#performClick when a click is detectedAndroid事件ViewORM
- Mac視窗管理器:Stage View for mac v1.2啟用版MacView
- Granting and Managing Item Level Permission using SharePoint2013 Designer Workflow
- PLSQL Language Referenc-FOR迴圈-FOR迴圈中的EXIT WHEN和CONTINUE WHENSQL
- Oracle case when改寫SQLOracleSQL
- SpokenEnglish01_ When's it due?
- Laravel query when 的查詢Laravel
- TLS Poison - When TLS Hack youTLS
- mysql中case when的使用MySql