QuestionQ24

VerifiedPL/SQL Language Fundamentals

In one database, the HR.EMPLOYEES table contains the columns FIRST_NAME and EMPLOYEE_ID.

A row exists with EMPLOYEE_ID 201.

Examine these packages created by user HR:

Question Image

EXECUTE privilege on the HR.API and HR.HELPER packages is granted to user SH.

Which two calls execute successfully?

Choose two
Explanation

ACCESSIBLE BY (api) restricts HR.HELPER to calls made by the whitelisted HR.API PL/SQL unit, preventing direct calls to the helper package and calls from an SH-owned API package. Both HR and SH can invoke HR.API.P1; its internal call is permitted because it originates in HR.API. HR.HELPER uses definer’s rights by default, so its static query of HR.EMPLOYEES executes using HR’s privileges.

Learn more

Community Discussion

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