nerdexam
Oracle

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.

Administering User Security

Question

Examine the commands executed in the following sequence:

Which statement is true about the above commands?

Exhibit

1Z0-052 question #198 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)
  • A
    10% (4)
  • B
    78% (31)
  • C
    3% (1)
  • D
    8% (3)
  • E
    3% (1)

Why each option

Oracle prevents circular role grants and raises an error when a grant would create a cycle in the role hierarchy.

AThe commands execute successfully.

Not all commands execute successfully because command 6 violates Oracle's circular role grant restriction and raises an error.

BCommand 6 produces an error because of circular role grant.Correct

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.

CCommand 5 produces an error because a role cannot be granted to another role.

Oracle explicitly supports granting a role to another role; this is a valid and common privilege management technique that does not cause an error.

DCommand 3 produces an error because the MGRROLE role already contains system privileges.

Oracle roles can simultaneously contain system privileges and other granted roles with no error raised for that combination.

EThe table created by HR remains and HR can grant the CREATE TABLE system privilege to other users.

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

#circular role grant#role privileges#role to role grant#ORA error

Community Discussion

No community discussion yet for this question.

Full 1Z0-052 Practice