1Z0-052 · Question #21
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…
The correct answer is A. The command executes successfully. SL_REP can grant SELECT on SCOTT's EMP table because SL_REP holds the GRANT ANY OBJECT PRIVILEGE system privilege, which allows granting object privileges on any schema object regardless of ownership.
Question
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?
Exhibit
Options
- AThe command executes successfully
- BThe command produces an error because the EMP table is owned by SCOTT
- CThe command produces an error because SL_REP has the GRANT ANY OBJECT PRIVILEGE
- DThe command produces an error because SL_REP does not have the SELECT privilege with
How the community answered
(24 responses)- A75% (18)
- B8% (2)
- C13% (3)
- D4% (1)
Why each option
SL_REP can grant SELECT on SCOTT's EMP table because SL_REP holds the GRANT ANY OBJECT PRIVILEGE system privilege, which allows granting object privileges on any schema object regardless of ownership.
The GRANT ANY OBJECT PRIVILEGE system privilege allows SL_REP to grant any object privilege on any schema object in the database, including objects owned by other users like SCOTT's EMP table, so the command completes successfully without error.
Ownership of the table is irrelevant when the granting user holds GRANT ANY OBJECT PRIVILEGE, which overrides the normal ownership requirement for granting privileges.
Having GRANT ANY OBJECT PRIVILEGE is precisely what enables the command to succeed, not a cause for failure - it is a valid system-level authorization.
SL_REP does not need the SELECT privilege WITH GRANT OPTION because GRANT ANY OBJECT PRIVILEGE provides a broader system-level right to grant object privileges on any object in any schema.
Concept tested: GRANT ANY OBJECT PRIVILEGE system privilege in Oracle
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/GRANT.html
Topics
Community Discussion
No community discussion yet for this question.
