QuestionQ51

VerifiedPL/SQL Language Fundamentals

Examine the following facts:

  • Table EMP exists in schema USERA and has the columns SALARY and EMP_ID.
  • EMP_ID is the primary key, with values from 1 through 100.
  • USERA successfully executes these statements:

Question Image

USERA then grants EXECUTE privilege on procedure MYPROC to USERB.

USERB exists in the database identified by pdb1, but has no SELECT privilege on USERA.EMP.

USERB now executes these statements:

conn userB/userB@pdb1  
execute userA.myproc;  

Which statement is true?

Explanation

A stored procedure with no AUTHID clause is a definer's-rights procedure by default. MYPROC therefore accesses USERA.EMP using USERA's privileges; an invoker granted EXECUTE needs no privilege on the underlying table. The call executes successfully.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!