【Oracle】Oracle——角色,用户,授权操作题

目录

对scott方案下的表dept,完成以下内容:

(1) 使用system身份连接数据库。创建用户test_user,其口令为oracle

(2) 向用户test_user授予连接数据库的系统权限

(3) 向用户test_user授予对象scott.dept的select权限

(4) 向用户test_user授予对象scott.dept的insert、delete权限,对loc字段具有更新权力

(5) 用户test_user具有对dept表的所有权力,并具有给其他用户授权的权力

(6) 撤消用户test_user对dept表的所有权限

(7) 用户test_user只有查看10号部门的权力,不能查看其他部门信息

(8) 建立角色role1,具有连接数据库、创建表的权力

(9) 将role1角色的权力授予给用户test_user

(10) 删除角色role1


对scott方案下的表dept,完成以下内容:

(1) 使用system身份连接数据库。创建用户test_user,其口令为oracle

create user test_user identified by oracle;

(2) 向用户test_user授予连接数据库的系统权限

grant create session to test_user;

(3) 向用户test_user授予对象scott.dept的select权限

grant select on scott.dept to test_user;

(4) 向用户test_user授予对象scott.dept的insert、delete权限,对loc字段具有更新权力

grant insert,delete,update(loc) on scott.dept to test_user;

(5) 用户test_user具有对dept表的所有权力,并具有给其他用户授权的权力

grant all on scott.dept to test_user with grant option;

(6) 撤消用户test_user对dept表的所有权限

revoke all on scott.dept from test_user;

(7) 用户test_user只有查看10号部门的权力,不能查看其他部门信息

create view scott.v_select as select * from scott.dept where deptno=10; 
grant select on scott.v_select to test_user;

(8) 建立角色role1,具有连接数据库、创建表的权力

create role role1;
grant create session,create table to role1;

(9) 将role1角色的权力授予给用户test_user

grant role1 to test_user;

(10) 删除角色role1

drop role role1;

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值