oracle简化权限管理用什么,oracle权限管理

授权原则:最小权限原则

通过角色给用户授权可以方便简化管理员管理权限

业务账号创建:

创建特定表空间:

CREATE TABLESPACE TBS1 DATAFILE ‘/u01/app/oracle/oradata/PROD4/PROD4/TBS1.DBF‘ SIZE 100M;

创建特点临时表空间:

create temporary tablespace temp2 tempfile ‘/u01/app/oracle/oradata/PROD4/PROD4/temp2.dbf‘ size 50m ;

创建业务用户:

create user "mytest" profile "DEFAULT" identified by 123456 default tablespace "tbs1" temporary tablespace "temp2" account unlock;

给用户授权:

grant RESOURCE to mytest;

给员工创建oracle账号:

SQL> create user fxh identified by "123456";

SQL> grant connect to fxh;

SQL> grant select on hr.employees to fxh;

帐户解锁

SQL> alter user hr identified by 123456 account unlock;

权限查询:

1、查询某个用户具有的权限:

查询某个用户具有的角色:

select grantee,granted_role from dba_role_privs where grantee=‘HR‘;

查询某个用户具有的系统权限:

select grantee,privilege from dba_sys_privs where grantee=‘HR‘;

查询某个用户具有的对象权限:

select GRANTEE,OWNER,TABLE_NAME,PRIVILEGE from dba_tab_privs WHERE grantee=‘HR‘;

2、查询某个角色的权限:

查询某个角色具有的对像权限:

SQL> select * from role_tab_privs where role=‘AA‘;

查询某个角色中具有什么系统权限:

select privilege from role_sys_privs where role=‘RESOURCE‘;

查询某个角色中包含有什么角色

select granted_role from role_role_privs where role=‘SYSDBA‘;

原文:http://www.cnblogs.com/fanxuanhui-linux/p/7091847.html

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值