oracle 用户创建角色,oracle普通用户创建和加权限
普通用戶床架和加權(quán)限
create user test1 identified by test1; grant connect to test1;
grant resource to test1;
grant create snapshot to test1;
grant create synonym to test1;
grant create view to test1;
grant select any table to test1;
grant create any trigger to test1;
grant create any view to test1;
grant select any dictionary to test1;
grant unlimited tablespace to test1;
查看角色擁有的權(quán)限
select grantee,privilege from dba_sys_privs where grantee='RESOURCE' order by privilege;
CONNECT角色:??? –是授予最終用戶的典型權(quán)利,最基本的
CREATE??? SESSION??? –建立會(huì)話
RESOURCE角色:??? –是授予開發(fā)人員的
CREATE??? CLUSTER???????? –建立聚簇
CREATE??? PROCEDURE??? –建立過程
CREATE??? SEQUENCE????? –建立序列
CREATE??? TABLE????????????? –建表
CREATE??? TRIGGER????????? –建立觸發(fā)器
CREATE??? TYPE??????????????? –建立類型
CREATE??? OPERATOR?????? –創(chuàng)建操作者
CREATE??? INDEXTYPE????? –創(chuàng)建索引類型
CREATE??? TABLE????????????? –創(chuàng)建表
1.查看所有用戶:
select * from dba_users;
select * from all_users;
select * from user_users;
2.查看用戶或角色系統(tǒng)權(quán)限:
select * from dba_sys_privs;
select * from user_sys_privs;
3.查看用戶對(duì)象權(quán)限:
select * from dba_tab_privs;
select * from all_tab_privs;
select * from user_tab_privs;
4.查看所有角色:
select * from dba_roles;
5.查看用戶或角色所擁有的角色:
select * from dba_role_privs;
select * from user_role_privs;
注意:
1、以下語句可以查看Oracle提供的系統(tǒng)權(quán)限
select name from sys.system_privilege_map
2、查看一個(gè)用戶的所有系統(tǒng)權(quán)限(包含角色的系統(tǒng)權(quán)限)
select privilege from dba_sys_privs where grantee='DATAUSER'
union
select privilege from dba_sys_privs where grantee in (select granted_role from dba_role_privs where grantee='DATAUSER' );
參考:
http://www.2cto.com/database/201408/322396.html
總結(jié)
以上是生活随笔為你收集整理的oracle 用户创建角色,oracle普通用户创建和加权限的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: php如何做浏览量,php+ajax实现
- 下一篇: jca oracle官方文档,Oracl