首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

创建视图需要注意的有关问题

2012-07-04 
创建视图需要注意的问题创建视图报错SQL create or replace view stats2as select STAT... || a.name n

创建视图需要注意的问题

创建视图报错

SQL> create or replace view stats  2  as select 'STAT...' || a.name name, b.value  3        from v$statname a, v$mystat b  4       where a.statistic# = b.statistic#  5      union all  6      select 'LATCH.' || name,  gets  7        from v$latch  8    union all  9    select 'STAT...Elapsed Time', hsecs from v$timer;      from v$statname a, v$mystat b                         *第 3 行出现错误: ORA-01031: 权限不足

?解决办法:授权对象v_$statname,v_$latch,v_$timer, v_$mystat

SQL> grant select on v_$statname to carmot_develop;SQL> grant select on v_$latch to carmot_develop;SQL> grant select on v_$timer to carmot_develop;SQL> grant select on v_$mystat to carmot_develop;
?

?

热点排行