Oracle DIUTIL
Version 26ai

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

Oracle Database 26ai is now availble. If you haven't you downloaded already: Why?
Purpose Diana application routines.
AUTHID DEFINER
Constants
Name Data Type Value
Function Return Codes
s_ok NUMBER 0
s_subpnotfound NUMBER 1
s_stubtoolong NUMBER 3
s_logic NUMBER 4
s_other NUMBER 5
s_notinpackage NUMBER 6
s_notv6compat NUMBER 7
s_defaultval NUMBER 8
Library Units
libunit_type_spec NUMBER 1
libunit_type_body NUMBER 2
Load Sources
load_source_yes NUMBER 1
load_source_no NUMBER 2
Data Types SUBTYPE ptnod IS pidl.ptnod;

SUBTYPE ub4 IS pidl.ub4;
Dependencies
DBMS_STANDARD DIANA PRVT_DBMS_INMEMORY_ADVISOR
DBMS_WORKLOAD_REPLAY_I PIDL SUBPTXT2
Documented No
Exceptions
Error Code Reason
N/A e_notinpackage
N/A e_nopriv
N/A e_notv6compat
N/A e_other
N/A e_subpnotfound
N/A e_stubtoolong
First Available 7.3.4
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/diutil.sql
Subprograms
 
ATTRIBUTE_USE_STATISTICS
Reports libunit's attribute count and limit diutil.attribute_use_statistics(
libunit_node    IN  ptnod,
attribute_count OUT ub4, 
attribute_limit OUT ub4);
Clear text source code in package body
 
BOOL_TO_INT
Translates 3-valued BOOLEAN to NUMBER diutil.bool_to_int(b IN BOOLEAN) RETURN NUMBER;
SELECT diutil.bool_to_int(TRUE)

DIUTIL.BOOL_TO_INT
------------------
                 1
 
GET_D
Returns the root OF the diana OF a libunit, given name AND user

Name will be first folded TO upper CASE IF NOT IN quotes, ELSE stripped OF quotes
diutil.get_d(
name         IN     VARCHAR2,
usr          IN     VARCHAR2,
dbname       IN     VARCHAR2,
dbowner      IN     VARCHAR2,
status       IN OUT ub4,
nod             OUT ptnod, 
libunit_type IN     NUMBER := libunit_type_spec,
load_source  IN     NUMBER := load_source_no);
Clear text source code in package body
 
GET_DIANA
Returns the root OF the diana OF a libunit, given name AND usr.

Name will be first folded TO upper CASE IF NOT IN quotes, ELSE stripped OF quotes. Will trace synonym links.
diutil.get_diana(
name         IN     VARCHAR2,
usr          IN     VARCHAR2,
dbname       IN     VARCHAR2,
dbowner      IN     VARCHAR2,
status       IN OUT ub4,
nod          IN OUT ptnod,
libunit_type IN     NUMBER := libunit_type_spec,
load_source  IN     NUMBER := load_source_no);
Clear text source code in package body
 
INT_TO_BOOL
Translates 3-valued NUMBER encoding to BOOLEAN diutil.int_to_bool(n IN NUMBER) RETURN BOOLEAN;
SELECT diutil.int_to_bool(0);

DIUTIL.INT_TO_BOOL
------------------

FALSE
 
NODE_USE_STATISTICS
Reports libunit's node count and limit diutil.node_use_statistics(
libunit_node IN  ptnod, 
node_count   OUT ub4,   -- diana nodes
node_limit   OUT ub4);
Clear text source code in package body
 
SUBPTXT
Returns the text OF a subprogram source (describe). diutil.subptxt(
name    IN     VARCHAR2,
subname IN     VARCHAR2,
usr     IN     VARCHAR2, 
dbname  IN     VARCHAR2,
dbowner IN     VARCHAR2,
txt     IN OUT VARCHAR2,
status  IN OUT ub4);
Clear text source code in package body
Thanks to Maxim Demenko for pointing me to this package
-- note also SYS functions SUBPTXT and SUBPTXT2 --

Related Topics
Built-in Functions
Built-in Packages
DIANA
PIDL
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