1Z0-052 · Question #123
View the Exhibit and examine the PL/SQL package and procedure. You made changes to the COMPUTE_TAX function inside the EMP_ADMIN package body. Which statement is true after you recompile the…
The correct answer is A. The USE_P procedure remains valid. Recompiling an Oracle package body without altering the package specification leaves all dependent objects valid, because Oracle tracks dependencies against the public specification interface, not the body implementation.
Question
View the Exhibit and examine the PL/SQL package and procedure. You made changes to the COMPUTE_TAX function inside the EMP_ADMIN package body. Which statement is true after you recompile the EMP_ADMIN package body?
Exhibit
Options
- AThe USE_P procedure remains valid.
- BThe USE_P procedure becomes invalid.
- CThe SHOW_DETAIL procedure becomes invalid.
- DThe EMP_ADMIN package specification becomes invalid and needs to be recompiled.
How the community answered
(38 responses)- A71% (27)
- B8% (3)
- C16% (6)
- D5% (2)
Why each option
Recompiling an Oracle package body without altering the package specification leaves all dependent objects valid, because Oracle tracks dependencies against the public specification interface, not the body implementation.
Oracle records object dependencies against the package specification (the public interface), not the package body; because the EMP_ADMIN specification was not changed or recompiled, USE_P and all other dependent objects retain their VALID status.
USE_P does not become invalid because it depends on the package specification, which is unchanged; only a modification to the specification would propagate invalidity to dependent procedures.
SHOW_DETAIL remains valid for the same reason as USE_P - recompiling only the package body leaves the specification intact, so no dependent objects are marked invalid by Oracle.
Recompiling a package body has no effect on the package specification; the specification is invalidated only when it is explicitly altered or dropped, not when the body is recompiled independently.
Concept tested: Oracle package body recompilation and dependent object validity
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/lnpls/CREATE-PACKAGE-BODY-statement.html
Topics
Community Discussion
No community discussion yet for this question.
