1Z0-149 practice question 8 of 15

Which two are true about the PLSQL_CODE_TYPE parameter? (Choose two.)

Full set: 65 questions
Answer options
A: Changing the parameter setting automatically changes the setting for existing PL/SQL library units.
B: The default value is NATIVE.
C: If set to NATIVE, programs are stored in platform dependent machine code. Correct answer
D: It can use the REUSE SETTINGS clause to recompile a program unit without changing to the current session settings. Correct answer
E: If set to NATIVE, programs are stored in a PL/SQL bytecode format.
Correct Answer:
C. If set to NATIVE, programs are stored in platform dependent machine code.; D. It can use the REUSE SETTINGS clause to recompile a program unit without changing to the current session settings.
Explanation

The PLSQLCODETYPE parameter controls the compilation method for PL/SQL units. When set to NATIVE (option C), the PL/SQL code is compiled into platform-specific machine code, which is stored in the database and generally executes faster than interpreted code. The REUSE SETTINGS clause (option D) of the ALTER ... COMPILE statement allows a PL/SQL unit to be recompiled using the same compiler settings that were stored with it during its last compilation, thereby ignoring the current session's settings for parameters like PLSQLCODETYPE.

Why Incorrect

A: Changing the parameter only affects new compilations. Existing units retain their code type until they are explicitly recompiled. B: The default value for the PLSQLCODETYPE parameter is INTERPRETED, not NATIVE. E: NATIVE compilation produces machine code. INTERPRETED compilation produces a platform-independent bytecode format.

References

- Oracle Database Reference, 19c, Chapter 1, "Initialization Parameters", description of PLSQLCODETYPE. It states the default is INTERPRETED and the values are INTERPRETED or NATIVE.

- Oracle Database PL/SQL Language Reference, 19c, Chapter 1, "Introduction to PL/SQL", Section "PL/SQL Native Compilation". It states: "With native compilation, the PL/SQL source code is translated into native code for the platform... and stored in the database."

- Oracle Database SQL Language Reference, 19c, ALTER PROCEDURE documentation, "COMPILE Clause". It describes REUSE SETTINGS as preserving the existing settings for the subprogram, ignoring session settings.

Scroll to Top