OCP 1Z0 052 V8 02 9题

本文通过一个具体案例,详细解析了SQL中如何正确地进行权限管理。通过创建用户、分配角色和对象权限,演示了SL_REP用户如何成功授予HR用户访问SCOTT的EMP表的SELECT权限。

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.youkuaiyun.com/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

9. View the Exhibit and examine the privileges granted to the SL_REP user. 

The EMP table is owned by the SCOTT user. The SL_REP user executes the following command:

SQL> GRANT SELECT ON scott.emp TO hr;

Which statement describes the outcome of the command?

 

A.The command executes successfully.

B.The command produces an error because the EMP table is owned by SCOTT.

C.The command produces an error because SL_REP has the GRANT ANY OBJECT PRIVILEGE without

ADMIN_OPTION.

D.The command produces an error because SL_REP does not have the SELECT privilege with

GRANT_OPTION on the EMP table.

Answer: A  
答案解析:
环境测试一下:
1、创建一个用户,并解锁
sys@TEST0924> create user SL_REP identified by 123 account unlock;

User created.
2、将connect、resource角色赋予
sys@TEST0924> grant connect,resource to SL_REP;

Grant succeeded.
3、将grant any object privilege 赋予

sys@TEST0924> grant grant any object privilege to SL_REP;

Grant succeeded.
4、SL_REP连接数据库,开始授予hr访问scott的emp表,赋予成功。所以选择A。
sys@TEST0924> conn SL_REP/123
Connected.

sl_rep@TEST0924> grant select on scott.emp to hr;

Grant succeeded.

           

给我老师的人工智能教程打call!http://blog.youkuaiyun.com/jiangjunshow
这里写图片描述
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值