What would be the outcome after executing the statements?

OE and SCOTT are the users in the database. The ORDERS table is owned by OE. Evaluate the statements issued by the DBA in the following sequence:
CREATE ROLE r1;
GRANT SELECT, INSERT ON oe.orders TO r1;
GRANT r1 TO scott;
GRANT SELECT ON oe.orders TO scott;
REVOKE SELECT ON oe.orders FROM scott;
What would be the outcome after executing the statements?

OE and SCOTT are the users in the database. The ORDERS table is owned by OE. Evaluate the statements issued by the DBA in the following sequence:
CREATE ROLE r1;
GRANT SELECT, INSERT ON oe.orders TO r1;
GRANT r1 TO scott;
GRANT SELECT ON oe.orders TO scott;
REVOKE SELECT ON oe.orders FROM scott;
What would be the outcome after executing the statements?

A.
SCOTT would be able to query the OE.ORDERS table.

B.
SCOTT would not be able to query the OE.ORDERS table.

C.
The REVOKE statement would remove the SELECT privilege from SCOTT as well as from the role R1.

D.
The REVOKE statement would give an error because the SELECT privilege has been granted to the role R1.



Leave a Reply 4

Your email address will not be published. Required fields are marked *


umesh bhutada

umesh bhutada

A

Igor

Igor

Wow! such guess, much information, wow.

seenagape

seenagape

Correct answer is A

doris

doris

Grant Select/Insert object privilege OE.order –>r1 –>Scott
Grant Select object privilege OE.order –>Scott
revoke Select from Scott so the second line disabled.
But for the first line, can not revoke scott directly, if the system wanna revoke all select privilege from Scott have to revoke r1 at first