日期:2014-05-17 浏览次数:20823 次
SQL> select * from role_sys_privs where role='CONNECT' ; ROLE PRIVILEGE ADM ------------------------------ ---------------------------------------- --- CONNECT CREATE SESSION NO SQL> select * from role_sys_privs where role='RESOURCE' ; ROLE PRIVILEGE ADM ------------------------------ ---------------------------------------- --- RESOURCE CREATE SEQUENCE NO RESOURCE CREATE TRIGGER NO RESOURCE CREATE CLUSTER NO RESOURCE CREATE PROCEDURE NO RESOURCE CREATE TYPE NO RESOURCE CREATE OPERATOR NO RESOURCE CREATE TABLE NO RESOURCE CREATE INDEXTYPE NO
------解决方案--------------------
resource角色不包含create view的系统权限了。
以下是检查授予角色的系统权限
SQL> select * from role_sys_privs;
ROLE PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
RESOURCE CREATE SEQUENCE NO
RESOURCE CREATE TRIGGER NO
RESOURCE CREATE CLUSTER NO
RESOURCE CREATE PROCEDURE NO
RESOURCE CREATE TYPE NO
CONNECT CREATE SESSION NO
RESOURCE CREATE OPERATOR NO
RESOURCE CREATE TABLE NO
RESOURCE CREATE INDEXTYPE NO
已选择9行。
可以看到RESOURCE中没有‘create view’权限
如何获得‘create view’权限呢?
1. 直接给用户授予‘create view’权限:
例如有一个test用户需要创建视图,在system用户下授予权限。
sql> grant create view to test;
2. 给角色赋予‘create view’权限:
sql> grant create view to RESOURCE;