Oracle Database: Program with PL/SQL — Question 67
Select the correct statement regarding BEQUEATH CURRENT_USER.
Answer options
- A. If a view references a PL/SQL function then BEQUEATH CURRENT_USER allows the function to execute with DBA privileges, regardless of the invoking users privileges.
- B. The BEQUEATH CURRENT_USER clause allows invoker’s rights functions referenced in a view to execute with the privileges of the invoking user.
- C. Any view calling a PL/SQL function with BEQUEATH CURRENT_USER in effect will execute with the privileges of the function owner.
- D. With the BEQUEATH CURRENT_USER clause, a definer’s rights function referenced in a view executes with the privileges of the view owner, not the function
Correct answer: B
Explanation
The correct answer is B because the BEQUEATH CURRENT_USER clause allows invoker's rights functions to execute under the privileges of the user who is invoking the view. Option A is incorrect because BEQUEATH CURRENT_USER does not grant DBA privileges. Option C is wrong since it states that the execution privileges are those of the function owner, which is not the case with this clause. Option D inaccurately describes the privileges under which a definer's rights function runs, which is not affected by BEQUEATH CURRENT_USER.