Home
Subprograms GENERATESCHEMA and GENERATESCHEMAS from DBMS_XMLSCHEMA package are desupported
Description
The subprograms GENERATESCHEMA and GENERATESCHEMAS from the DBMS_XMLSCHEMA package are desupported in Oracle Database 18c and later. These procedures were previously used to generate XML schemas from existing database objects but are no longer supported as part of Oracle's effort to deprecate Oracle XML DB-specific features.
Any usage of these subprograms should be removed or replaced with custom solutions based on database metadata queries or external tools capable of generating XML schema definitions.
Key Benefits
- Improved Compatibility: Ensures code is compatible with Oracle 18c+ where these subprograms are no longer supported.
- Avoid Runtime Errors: Prevents failures due to missing or non-functional subprogram calls.
- Modernization: Encourages migration to modern, supported approaches for XML schema handling.
Non-compliant Code Example
DECLARE
v_schema CLOB;
BEGIN
v_schema := DBMS_XMLSCHEMA.GENERATESCHEMA( --Non compliant code (GENERATESCHEMA subprogram is desupported)
schema => 'HR',
table_name => 'EMPLOYEES'
);
DBMS_OUTPUT.PUT_LINE(v_schema);
END;
DECLARE
v_schemas CLOB;
BEGIN
v_schemas := DBMS_XMLSCHEMA.GENERATESCHEMAS( --Non compliant code (GENERATESCHEMAS subprogram is desupported)
schema => 'HR'
);
DBMS_OUTPUT.PUT_LINE(v_schemas);
END;
