nerdexam
Oracle

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.

Administering User Security

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

1Z0-052 question #21 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)
  • A
    75% (18)
  • B
    8% (2)
  • C
    13% (3)
  • D
    4% (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.

AThe command executes successfullyCorrect

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.

BThe command produces an error because the EMP table is owned by SCOTT

Ownership of the table is irrelevant when the granting user holds GRANT ANY OBJECT PRIVILEGE, which overrides the normal ownership requirement for granting privileges.

CThe command produces an error because SL_REP has the GRANT ANY OBJECT PRIVILEGE

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.

DThe command produces an error because SL_REP does not have the SELECT privilege with

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

#GRANT ANY OBJECT PRIVILEGE#object privileges#privilege delegation#WITH GRANT OPTION

Community Discussion

No community discussion yet for this question.

Full 1Z0-052 Practice