重庆思庄Oracle、Redhat认证学习论坛
标题: ORA-01031 新建用户创建视图提示权限不足 [打印本页]
作者: denglj 时间: 2021-12-20 10:36
标题: ORA-01031 新建用户创建视图提示权限不足
新建用户jack,授予connect、resource、unlimited tablespace权限,发现不能创建视图
SQL> create or replaceview ts
2 as
3 select * from employees order by id;
create or replace view ts
*
ERROR at line 1:
ORA-01031: insufficient privileges
记得connect是包含create view权限的,于是查询dba_sys_privs数据字典确认connect的权限
SQL> r
1* select * fromdba_sys_privs where grantee='CONNECT'
GRANTEE PRIVILEGE ADMIN_
-------------------- -------------------- ------
CONNECT CREATESESSION NO
确认到connect只有create session的权限后以sys登陆授予jack用户create view权限
SQL> show user
USER is "SYS"
SQL> grant create view to jack;
Grant succeeded.
然后用jack用户创建视图
SQL> create or replace view ts
2 as
3 select id,salary from employees order by id;
View created.
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) |
Powered by Discuz! X3.2 |