|
oracle 11g r2,发现一个很不好理解的问题,一条语句可以查询,但是使用这条语句创建视图的时候就报权限不足,请有遇到过的帮帮忙,具体信息如下:
SQL> create user mcc identified by sss;
User created.
SQL> grant connect,resource,create view ,dba to mcc;
Grant succeeded.
SQL> conn mcc/sss
Connected.
SQL> create or replace view redo_size as select value from v$mystat a,v$statname b
where a.statistic#=b.statistic# and name='redo size';
2 create or replace view redo_size as select value from v$mystat a,v$statname b
*
ERROR at line 1:
ORA-01031: insufficient privileges
SQL> conn / as sysdba
Connected.
SQL> grant select on v_$sysstat to mcc;
Grant succeeded.
SQL> grant select on v_$statname to mcc;
Grant succeeded.
SQL> conn mcc/sss
Connected.
SQL> create or replace view redo_size as select value from v$mystat a,v$statname b
where a.statistic#=b.statistic# and name='redo size';
2 create or replace view redo_size as select value from v$mystat a,v$statname b
*
ERROR at line 1:
ORA-01031: insufficient privileges
SQL> create view v_test1 as select * from v$statname where rownum=1;
View created.
SQL> select value from v$mystat a,v$statname b
where a.statistic#=b.statistic# and name='redo size'; 2
VALUE
----------
10876
|
|