问题:使用scott登录Oracle以后,创建视图,提示“权限不够”,怎么解决?

来源:互联网 发布:kali linux ibus 编辑:程序博客网 时间:2024/04/30 22:33

create or replace view emp_view

as
select deptno,count(*) total_employeer,sum(sal) total_salary
from emp 
group by deptno
 
ORA-01031: 权限不足
 
SQL> show user;
User is "scott"

 

这是因为scott这个帐户目前没有创建视图的权限。解决方法为:
首先使用system帐户进行登录。

SQL> grant create any view to scott;
 
Grant succeeded


0 0