oracle 用户创建角色,oracle普通用户创建和加权限

普通用户床架和加权限

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值