加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

oracle普通用户创建和加权限

发布时间:2020-12-12 14:52:35 所属栏目:百科 来源:网络整理
导读:普通用户床架和加权限 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 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;


查看角色拥有的权限

select grantee,privilege from dba_sys_privs where grantee='RESOURCE' order by privilege;

CONNECT角色: –是授予最终用户的典型权利,最基本的
CREATE SESSION –建立会话

RESOURCE角色: –是授予开发人员的
CREATE CLUSTER –建立聚簇
CREATE PROCEDURE –建立过程
CREATE SEQUENCE –建立序列
CREATE TABLE –建表
CREATE TRIGGER –建立触发器
CREATE TYPE –建立类型
CREATE OPERATOR –创建操作者
CREATE INDEXTYPE –创建索引类型
CREATE TABLE –创建表


1.查看所有用户:
select * from dba_users;
select * from all_users;
select * from user_users;
2.查看用户或角色系统权限:
select * from dba_sys_privs;
select * from user_sys_privs;
3.查看用户对象权限:
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提供的系统权限

select name from sys.system_privilege_map

2、查看一个用户的所有系统权限(包含角色的系统权限)


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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读