1Z0-052 · Question #198
Examine the commands executed in the following sequence: Which statement is true about the above commands?
The correct answer is B. Command 6 produces an error because of circular role grant. Oracle prevents circular role grants and raises an error when a grant would create a cycle in the role hierarchy.
Question
Examine the commands executed in the following sequence:
Which statement is true about the above commands?
Exhibit
Options
- AThe commands execute successfully.
- BCommand 6 produces an error because of circular role grant.
- CCommand 5 produces an error because a role cannot be granted to another role.
- DCommand 3 produces an error because the MGRROLE role already contains system privileges.
- EThe table created by HR remains and HR can grant the CREATE TABLE system privilege to other users.
How the community answered
(40 responses)- A10% (4)
- B78% (31)
- C3% (1)
- D8% (3)
- E3% (1)
Why each option
Oracle prevents circular role grants and raises an error when a grant would create a cycle in the role hierarchy.
Not all commands execute successfully because command 6 violates Oracle's circular role grant restriction and raises an error.
Oracle enforces a rule that role grants cannot form a circular dependency - if ROLE_A has already been granted to ROLE_B, attempting to grant ROLE_B back to ROLE_A (command 6) raises ORA-01934, because it would create a cycle in the role grant chain.
Oracle explicitly supports granting a role to another role; this is a valid and common privilege management technique that does not cause an error.
Oracle roles can simultaneously contain system privileges and other granted roles with no error raised for that combination.
The error occurs on the role grant in command 6, not on table creation or system privilege delegation by HR.
Concept tested: Oracle circular role grant restriction
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/dbseg/configuring-privilege-and-role-authorization.html
Topics
Community Discussion
No community discussion yet for this question.
