新建用户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.
|