nerdexam
Oracle

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.

Managing Schema Objects

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

1Z0-052 question #123 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)
  • A
    71% (27)
  • B
    8% (3)
  • C
    16% (6)
  • D
    5% (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.

AThe USE_P procedure remains valid.Correct

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.

BThe USE_P procedure becomes invalid.

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.

CThe SHOW_DETAIL procedure becomes invalid.

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.

DThe EMP_ADMIN package specification becomes invalid and needs to be recompiled.

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

#PL/SQL packages#recompilation#object dependencies#package body

Community Discussion

No community discussion yet for this question.

Full 1Z0-052 Practice