Exam 1z0-149 All QuestionsBrowse all questions from this exam
Question 26

Examine these facts:

Table EMP exists in schema USERA with columns SALARY and EMP_ID.

EMP_ID is the primary key with values ranging from 1 to 100.

USERA now executes these statements successfully:

USERA then grants execute privilege on procedure MYPROC to USERB.

USERB exists in the database identified by pdb1 but does not have select privilege on USERA.EMP.

USERB now executes these statements:

conn userB/userB@pdb1

execute userA.myproc;

Which is true?

    Correct Answer: D

    Since no AUTHID clause is specified in the procedure, Oracle defaults to using AUTHID DEFINER. This means the procedure executes with the privileges of the definer, USERA, who has the necessary privileges to select from USERA.EMP. Therefore, USERB can successfully execute the procedure without any errors, even without direct select privileges on USERA.EMP.

Discussion
TheOracleWasTakenOption: D

D tested out. Because you're executing as definer's rights so even if its selecting from a table where UserB doesnt have any rights on, its executing as if he's userA who does have rights.

PietroOption: D

D - If the AUTHID clause is not specified, Oracle will default to using the AUTHID DEFINER