授予角色ROLE_TEST下列权限:
SYS@ abc > grant create role,create user,select any table to role_test;
Grant succeeded.
查看角色ROLE_TEST当前拥有的权限:
SYS@ abc > select * from dba_sys_privs where grantee='ROLE_TEST';
GRANTEE PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
ROLE_TEST SELECT ANY TABLE NO
ROLE_TEST CREATE USER NO
ROLE_TEST CREATE SESSION NO
ROLE_TEST CREATE ROLE NO
授予TEST1用户ROLE_TEST角色:
SYS@ abc > grant role_test to test1 with admin option;
Grant succeeded.
查看TEST1用户当前拥有的角色和系统权限:
SYS@ abc > select * from dba_role_privs where grantee='TEST1';
GRANTEE GRANTED_ROLE ADM DEF
------------------------------ ------------------------------ --- ---
TEST1 ROLE_TEST YES YES
TEST1 CONNECT NO YES
SYS@ abc > select * from dba_sys_privs where grantee='TEST1';
no rows selected
TEST1用户试图将角色ROLE_TEST中的权限select any table授予用户TEST2:
TEST1@ abc > grant select any table to test2;
Grant succeeded.
TEST1用户试图将角色ROLE_TEST中的权限 create user授予用户TEST2,with admin option:
TEST1@ abc > grant create user to test2 with admin option;
Grant succeeded.
TEST1用户将角色ROLE_TEST授予用户TEST2:
TEST1@ abc > grant role_test to test2;
Grant succeeded.
042题库中原题如下:
113. View the Exhibit to observe the privileges granted to the MGR_ROLE role.
The SCOTT user has been granted the CONNECT and RESOURCE roles only. The database administrator (DBA) grants MGR_ROLE to the SCOTT user by using this command:
SQL> GRANT MGR_ROLE TO SCOTT WITH ADMIN OPTION;
Which statement is true about the SCOTT user after he is granted this role?
A.The SCOTT user can grant the MGR_ROLE role and the privileges in it to other users.
B.The SCOTT user can grant the privileges in the MGR_ROLE role to other users but not with ADMIN_OPTION.
C. The SCOTT user can grant only the MGR_ROLE role to other users but not the privileges in it.
D.The SCOTT user can grant the privileges in the MGR_ROLE role to other users but cannot revoke privileges from them.
Answer: C
答案应该选择A,而不是C!
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25744374/viewspace-720897/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25744374/viewspace-720897/