Oracle DBMS_JAVA_DEFINERS
Version 26ai

General Information
Library Note Morgan's Library Page Header
The best Oracle News for FY2026

Oracle Database 26ai will be available on generic Linux platforms in January and soon on AIX and Windows
Purpose Utility support the compilation and decompilation of Java classes and methods within the Oracle Database.
AUTHID DEFINER
Dependencies
DBMS_JAVA    
Documented No
Exceptions
Error Code Reason
ORA-29532 Uncaught Java exception
First Available Not Known
Security Model Owned by SYS with no privileges granted.

A lower version grant to PUBLIC has been revoked.
Source {ORACLE_HOME}/javavm/install/initdbj.sql
Subprograms
 
COMPILE_CLASS_
Compiles all methods defined by the class identified by class name in the supplied schema and returns the number of methods successfully compiled dbms_java_definers.compile_class_(
schema    IN VARCHAR2,
classname IN VARCHAR2)
RETURN NUMBER;
TBD
 
COMPILE_METHOD_
Compiles the method specified by name and Java type signature  defined by the class identified by class name in the supplied schema

Returns the number of methods successfully compiled
dbms_java_definers.compile_method_(
schema     IN VARCHAR2,
classname  IN VARCHAR2,
methodname IN VARCHAR2,
methodsig  IN VARCHAR2)
RETURN NUMBER;
TBD
 
DECODE_NATIVE_COMPILER_OPTION_
Decodes, into a user-readable format, a persisted native-compiler option

This function is not intended to be used by users directly
dbms_java_definers.decode_native_compiler_option_(
optionname IN VARCHAR2,
value      IN VARCHAR2)
RETURN VARCHAR2;
SELECT dbms_java_definers.decode_native_compiler_option_('optimizationsLevel', 'High');

DBMS_JAVA_DEFINERS.DECODE_NATIVE_COMPILER_OPTION_('OPTIMIZATIONSLEVEL','HIGH')
------------------------------------------------------------------------------
High
 
GET_NTH_NATIVE_COMPILER_OPTION
Returns information about the specified native compiler option dbms_java_definers.get_nth_native_compiler_option(n IN NUMBER) RETURN VARCHAR2;
SELECT dbms_java_definers.get_nth_native_compiler_option(1);

DBMS_JAVA_DEFINERS.GET_NTH_NATIVE_COMPILER_OPTION(1)
----------------------------------------------------
Option 'asyncPollLevel'
Level of polling used by generated code.
Asycynchronous events (such as Ctrl-C interrupt) are polled for in
compiled code. This option specifies how compiled-code should poll
for these events.
Values:
SysEventsOnly - Poll on System-events (such as GC) only. This is default.
MethodEntry - Poll on each method-entry.
MethodEntryAndBranches - Poll on each method-entry and backwards-branch.
Format:
'asyncPollLevel', '<value>'


SELECT dbms_java_definers.get_nth_native_compiler_option(2);

DBMS_JAVA_DEFINERS.GET_NTH_NATIVE_COMPILER_OPTION(2)
----------------------------------------------------
Option 'debugTraceLevel'
Level of debugging trace used by the compiler.
Values:
None - No debugging. This is default.
Minimal - Minimal debugging.
OptimizationsSummary - Minimal debugging and summarize optimizer decisions.
OptimizationsDetail - Minimal debugging and detail optimizer decisions.
Verbose - Verbose debugging.
All - All debugging.
Format:
'debugTraceLevel', '<value>'

SELECT dbms_java_definers.get_nth_native_compiler_option(3);

DBMS_JAVA_DEFINERS.GET_NTH_NATIVE_COMPILER_OPTION(3)
----------------------------------------------------
Option 'debugAssertLevel'
Level of debugging assertions used by the compiler.
Values:
None - No assertions. This is default.
Minimal - Minimal assertions.
All - All assertions.
Format:
'debugAssertLevel', '<value>'

SELECT dbms_java_definers.get_nth_native_compiler_option(4);

DBMS_JAVA_DEFINERS.GET_NTH_NATIVE_COMPILER_OPTION(4)
----------------------------------------------------
Option 'optimizationsLevel'
Default optimization level of the compiler.
Setting this option modifies the default value of several individual
optimizations. Any value specified for individual optimizations override these
defaults. Note that the machine code of methods compiled with a lower
than default optimization level is saved in the database and reused in subsequent
database invocations, despite any higher subsequent optimization level setting.
Values:
High - All optimizations. This is the default default.
Medium - Medium optimizations. Avoid optimizations that significantly increase compile time.
When Medium is specified, the following optimzations are disabled by default:
optimizerSIMD
optimizerLoopBoundsCheckElimination
optimizerLoopUnrollOptimization
optimizerPartialRedundancyElimination
graphColoringRegAlloc
Low - Minimal optimizations.
When Low is specified, the following additional optimzations are disabled by default:
optimizerMethodInlining
optimizerHnumConditionalMethodInlining
optimizerEagerlyCompileForInlining
optimizerInlineExternalMethods
optimizerInlineExceptionalMethods
optimizerLoadStoreElimination
optimizerBoundsCheckRemoval
optimizerInlineNonLeafMethods
optimizerBoundsCheckRemovalSubtractionVertices
optimizerLoopLICMOptimization
optimizerConditionalMoves
optimizerAnnotationConstraints
optimizerWellKnownMethods
optimizerExceptionTraceHandling
optimizerOperationCombining
optimizerStaticProfileAnalysis
regallocPartitionRegisters
regallocCoalesceSpillLoadsStores
scheduleInstructions
None - No optimizations.
When None is specified, the following additional optimzations are disabled by default:
optimizerLoopPagedConversion
optimizerThrowConversion
optimizerBranchElimination
optimizerBranchSimplification
optimizerCopyPropagation
optimizerDeadCodeElimination
optimizerConstantFolding
optimizerCommonSubexpressionElimination
optimizerTypePropagation
optimizerStrengthReduction
optimizerCombineDivMod
optimizerBatchWKExceptions
optimizerSlowpathsOOL
regallocGenerateGCMaps
Format:
'optimizationsLevel', '<value>'

SELECT dbms_java_definers.get_nth_native_compiler_option(<tested_values_up_to_44>);
 
SET_NATIVE_COMPILER_OPTION_
sets a native-compiler option to the specified value for the given schema dbms_java_definers.set_native_compiler_option_(
optionname IN VARCHAR2,
value      IN VARCHAR2,
owner      IN NUMBER);
exec dbms_java_definers.set_native_compiler_option_('optimizationsLevel', 'High', 0);

PL/SQL procedure successfully completed.
 
UNCOMPILE_CLASS_
Decompiles all methods defined by the class identified by classname in the supplied schema dbms_java_definers.uncompile_class_(
schema     IN VARCHAR2,
classname  IN VARCHAR2,
permanentp IN NUMBER)
RETURN NUMBER;
TBD
 
UNCOMPILE_METHOD_
Decompile the method specified by the name and Java type signature defined by the class identified by classname in the supplied schema dbms_java_definers.uncompile_method_(
schema     IN VARCHAR2,
classname  IN VARCHAR2,
methodname IN VARCHAR2,
methodsig  IN VARCHAR2,
permanentp IN NUMBER)
RETURN NUMBER;
TBD
 
UNSET_NATIVE_COMPILER_OPTION_
unsets a native-compiler option given by the tuple [optionName, value] for the given schemas

If the option given by optionName is not allowed to have duplicate values, then the value is ignored
dbms_java_definers.unset_native_compiler_option_(
optionname IN VARCHAR2
value      IN VARCHAR2
owner      IN NUMBER);
exec dbms_java_definers.unset_native_compiler_option_('optimizationsLevel', 'High', 0);

PL/SQL procedure successfully completed.

Related Topics
Built-in Functions
Built-in Packages
Database Security
DBMS_JAVA
DBMS_JAVA_DEV
DBMS_JAVA_DUMP
DBMS_JAVA_MISC
DBMS_JAVA_TEST
What's New In 21c
What's New In 26ai

Morgan's Library Page Footer
This site is maintained by Daniel Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2026 Daniel A. Morgan All Rights Reserved