During the application of the 19.27 (APR2025) patch to a client database, ORA-38824 errors were encountered during the datapatch process.

-> Error at line 214995: script ctx/admin/drixmd.pkh
- ORA-38824: A CREATE OR REPLACE command may not change the EDITIONABLE property
- of an existing object.
-> Error at line 215281: script ctx/admin/driparse.plb
- ORA-38824: A CREATE OR REPLACE command may not change the EDITIONABLE property
- of an existing object.
-> Error at line 215558: script ctx/admin/drirepm.plb
- ORA-38824: A CREATE OR REPLACE command may not change the EDITIONABLE property
- of an existing object.
- - more listed not shown…

After a quick search on the Oracle support site, I found Doc ID 2856575.1 – ORA-38824 During Datapatch From Oracle Text Scripts. The solution was pretty straightforward: double-check to make sure CTXSYS was indeed created as a non-Oracle-maintained user, then alter the packages as editionable, reapply datapatch, and then revert the packages back to editionable.

Step 1: Connect as sysdba and verify that CTXSYS was created as a non-Oracle maintained user using below sql.

SQL> select username, oracle_maintained from dba_users
where username like 'CTXSYS%';

USERNAME        O
--------------- -
CTXSYS          N

Step 2: Execute below sql to convert the packages as non editionable.

SQL> alter package ctxsys.DRIXMD editionable;
alter package ctxsys.DRIPARSE editionable;
alter package ctxsys.DRIREPM editionable;
alter package ctxsys.DRIREPZ editionable;
alter package ctxsys.DRISGP editionable;
alter package ctxsys.DRIXMD editionable;
alter package ctxsys.DRVDDL editionable;
alter package ctxsys.DRVPARX editionable;
alter package ctxsys.DRVXTAB editionable;
alter package ctxsys.DRVRIO editionable;
alter package ctxsys.DRV0DDL editionable;
alter package ctxsys.CTX_REPORT editionable;
-- for 19.22
alter package ctxsys.DRIREPM editionable;
alter package ctxsys.DRIACCHELP editionable;
alter package ctxsys.DRIEXP editionable;

Step 3: Execute datapatch again

$ORACLE_HOME/OPatch/datapatch -verbose

-> Error at line 18509: script ctx/admin/drverr.plb
- ORA-38824: A CREATE OR REPLACE command may not change the noneditionable property
- of an existing object.
-> Error at line 18657: script ctx/admin/dr0tree.plb
- ORA-38824: A CREATE OR REPLACE command may not change the noneditionable property
- of an existing object.

However, we encountered additional errors, likely new to patch 19.27. As of this writing, the Oracle documentation has not been updated to include these specific errors. To identify the packages to be updated, consult the sqlpatch log for the necessary information. Below we find the 2 packages that received the ORA-38824 error.

/u01/app/oracle/cfgtoollogs/sqlpatch/37642901/27123174/37642901_ru_apply_EMDB19P_2025Jun25_08_47_50.log

CREATE OR REPLACE PACKAGE BODY ctx_tree wrapped
*
ERROR at line 1:
ORA-38824: A CREATE OR REPLACE command may not change the EDITIONABLE property
of an existing object.

create or replace package body drue wrapped
*
ERROR at line 1:
ORA-38824: A CREATE OR REPLACE command may not change the EDITIONABLE property
of an existing object.

Execute the alter package command and re-run datapatch again, which completed without any errors.

SQL> alter package ctxsys.DRUE editionable;
alter package ctxsys.CTX_TREE editionable;

$ORACLE_HOME/OPatch/datapatch -verbose

Step 4: Convert the packages back as non-editionable.

SQL> alter package ctxsys.DRIXMD noneditionable;
alter package ctxsys.DRIPARSE noneditionable;
alter package ctxsys.DRIREPM noneditionable;
alter package ctxsys.DRIREPZ noneditionable;
alter package ctxsys.DRISGP noneditionable;
alter package ctxsys.DRIXMD noneditionable;
alter package ctxsys.DRVDDL noneditionable;
alter package ctxsys.DRVPARX noneditionable;
alter package ctxsys.DRVXTAB noneditionable;
alter package ctxsys.DRVRIO noneditionable;
alter package ctxsys.DRV0DDL noneditionable;
alter package ctxsys.CTX_REPORT noneditionable;
-- for 19.22
alter package ctxsys.DRIREPM noneditionable;
alter package ctxsys.DRIACCHELP noneditionable;
alter package ctxsys.DRIEXP noneditionable;
-- for 19.27
alter package ctxsys.DRUE noneditionable;
alter package ctxsys.CTX_TREE noneditionable;

This scenario highlights the critical importance of thoroughly examining logfiles, especially when encountering unexpected errors during patching. While Oracle Support documentation provides valuable solutions for known issues, new patches or unique system configurations can introduce unforeseen challenges.. Always make the logfile your first point of reference for detailed error information.

Contact us with any other Oracle error questions!