The Context

In the context of Oracle Database Aplliances, you might need to remove an old Oracle Database Home (For instance 12c), while the ODA is already on a recent patch level.

For instance in my case : In an ODA patching operation, the appliance was already running 19.26 patchlevel On Oracle Linux 8.10, while an unused Oracle Database 12.2 home was still registered:

[root@server-oda1 ~]# odacli list-dbhomes

ID                                    Name               DB Version          DB Edition Home Location                                               Status
------------------------------------- ------------------ ------------------- ---------- ----------------------------------------------------------- ----------
de8c09c9-beaf-4a0d-937b-02cace2e0121 OraDB12201_home1   12.2.0.1.220118     EE         /u01/app/odaorahome/oracle/product/12.2.0.1/dbhome_1        CONFIGURED
a0d28b10-07a4-4c43-8504-751245ddd2c3 OraDB19000_home5   19.26.0.0.250121    EE         /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_5        CONFIGURED

No database was using the 12c home anymore, so it could safely be removed before continuing with the patching.

Let’s use the normal procedure :

[root@server-oda1 ~]# odacli delete-dbhome -i de8c09c9-beaf-4a0d-937b-02cace2e0121

The job fails almost immediately:

[root@server-oda1 ~]# odacli describe-job -i 8e725314-aaea-4f6a-bc7b-e820bb3ffbce

Job details
----------------------------------------------------------------
                     ID:  8e725314-aaea-4f6a-bc7b-e820bb3ffbce
            Description:  Database Home OraDB12201_home1 Deletion with ID de8c09c9-beaf-4a0d-937b-02cace2e0121
                 Status:  Running
                Created:  April 29, 2026 09:54:15 CEST
                Message:

Task Name                                Start Time                               End Time                                 Status
---------------------------------------- ---------------------------------------- ---------------------------------------- ----------------
Validate DB Home                         April 29, 2026 09:54:15 CEST             April 29, 2026 09:54:15 CEST             Success
de8c09c9-beaf-4a0d-937b-02cace2e0121
for deletion

[root@server-oda1 diag]# odacli describe-job -i 8e725314-aaea-4f6a-bc7b-e820bb3ffbce

Job details
----------------------------------------------------------------
                     ID:  8e725314-aaea-4f6a-bc7b-e820bb3ffbce
            Description:  Database Home OraDB12201_home1 Deletion with ID de8c09c9-beaf-4a0d-937b-02cace2e0121
                 Status:  Failure (To view Error Correlation report, run "odacli describe-job -i 8e725314-aaea-4f6a-bc7b-e820bb3ffbce --ecr" command)
                Created:  April 29, 2026 09:54:15 CEST
                Message:  DCS-10001:Internal error encountered: PRGH-1010 : Removal of Oracle home /u01/app/odaorahome/oracle/product/12.2.0.1/dbhome_1 failed
PRCZ-4001 : failed to execute command "/u01/app/odaorahome/oracle/product/12.2.0.1/dbhome_1/deinstall/deinstall" using the privileged execution plugin "odaexec" on nodes "server-oda1" within 4,000 seconds
PRCZ-2103 : Failed to execute command "/u01/app/odaorahome/oracle/product/12.2.0.1/dbhome_1/deinstall/deinstall" on node "server-oda1" as user "oracle". Detailed error:
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /u01/app/oraInventory/logs/

############ ORACLE DECONFIG TOOL START ############


######################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##


Checking for existence of the Oracle home location /u01/app/odaorahome/oracle/product/12.2.0.1/dbhome_1
Oracle Home type selected for deinstall is: Oracle Real Application Cluster Database
Oracle Base selected for deinstall is: /u01/app/odaorabase/oracle
Checking for existence of central inventory location /u01/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/app/19.26.0.0/grid
The following nodes are part of this cluster: server-oda1
ERROR: null.

Task Name                                Start Time                               End Time                                 Status
---------------------------------------- ---------------------------------------- ---------------------------------------- ----------------
DbHome service deletion for              April 29, 2026 09:54:15 CEST             April 29, 2026 09:54:30 CEST             Failure
de8c09c9-beaf-4a0d-937b-02cace2e0121
DbHome service deletion for              April 29, 2026 09:54:15 CEST             April 29, 2026 09:54:30 CEST             Failure
de8c09c9-beaf-4a0d-937b-02cace2e0121
Validate DB Home                         April 29, 2026 09:54:15 CEST             April 29, 2026 09:54:15 CEST             Success
de8c09c9-beaf-4a0d-937b-02cace2e0121
for deletion
Setting up SSH equivalence               April 29, 2026 09:54:15 CEST             April 29, 2026 09:54:15 CEST             Success
Setting up SSH equivalence               April 29, 2026 09:54:15 CEST             April 29, 2026 09:54:15 CEST             Success
Deleting DB Home by RHP                  April 29, 2026 09:54:16 CEST             April 29, 2026 09:54:30 CEST             Failure

There are “harsh” solutions provided online, I would not talk about here, because I don’t want to spread risky stuff.

However, understanding the issue provides us with a “clean” workaround :

The important point here is that odacli delete-dbhome eventually calls the standard Oracle 12.2 deinstall utility.

And as you most probably already know, the 12c deinstallation stack prerequisite checks expects by default the Oracle Linux 7 version. and the well known CV_ASSUME_DISTID environment variable is usually used to fix that.

The Workaround

The workaround is exactly positionning the CV_ASSUME_DISTID to OL7 (Oracle Linux 7)

CV_ASSUME_DISTID=OL7

Because the deinstallation process is launched internally by odacli, simply exporting the variable in my current shell would not guarantee that it would be inherited by the process started by ODA.

I therefore added it directly to the 12c deinstall script:

[oracle@server-oda1 ~]# sed -i '1a export CV_ASSUME_DISTID=OL7' /u01/app/odaorahome/oracle/product/12.2.0.1/dbhome_1/deinstall/deinstall

This is obviously a workaround rather than a change that should be applied blindly to every environment. Before using it, make sure that the DB Home is no longer used by any database and that the failure is actually related to the legacy prerequisite checks.

Deleting the DB Home Again

After adding the environment variable, I simply restarted the ODA deletion:

[root@server-oda1 ~]# odacli delete-dbhome -i de8c09c9-beaf-4a0d-937b-02cace2e0121
Job details
----------------------------------------------------------------
                     ID:  21c05801-e3fb-4cdb-bf40-36e6dc1e0157
            Description:  Database Home OraDB12201_home1 Deletion with ID de8c09c9-beaf-4a0d-937b-02cace2e0121
                 Status:  Running
                Created:  April 29, 2026 09:57:01 CEST
                Message:

Task Name                                Start Time                               End Time                                 Status
---------------------------------------- ---------------------------------------- ---------------------------------------- ----------------
Validate DB Home                         April 29, 2026 09:57:01 CEST             April 29, 2026 09:57:01 CEST             Success
de8c09c9-beaf-4a0d-937b-02cace2e0121
for deletion
Setting up SSH equivalence               April 29, 2026 09:57:01 CEST                                                      Running

[root@server-oda1 diag]# odacli describe-job -i 21c05801-e3fb-4cdb-bf40-36e6dc1e0157

Job details
----------------------------------------------------------------
                     ID:  21c05801-e3fb-4cdb-bf40-36e6dc1e0157
            Description:  Database Home OraDB12201_home1 Deletion with ID de8c09c9-beaf-4a0d-937b-02cace2e0121
                 Status:  Success
                Created:  April 29, 2026 09:57:01 CEST
                Message:

Task Name                                Start Time                               End Time                                 Status
---------------------------------------- ---------------------------------------- ---------------------------------------- ----------------
Validate DB Home                         April 29, 2026 09:57:01 CEST             April 29, 2026 09:57:01 CEST             Success
de8c09c9-beaf-4a0d-937b-02cace2e0121
for deletion
Setting up SSH equivalence               April 29, 2026 09:57:01 CEST             April 29, 2026 09:57:01 CEST             Success
Setting up SSH equivalence               April 29, 2026 09:57:01 CEST             April 29, 2026 09:57:01 CEST             Success
Deleting DB Home by RHP                  April 29, 2026 09:57:02 CEST             April 29, 2026 09:57:49 CEST             Success

Finally, verify that the old Oracle Home is no longer registered in ODA:

[root@server-oda1 ~]# odacli list-dbhomes

ID                                    Name               DB Version          DB Edition Home Location
------------------------------------- ------------------ ------------------- ---------- ---------------------------------------------------
a0d28b10-07a4-4c43-8504-751245ddd2c3 OraDB19000_home5   19.26.0.0.250121    EE         /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_5

Conclusion

This issue is a good reminder of the importance of keeping Oracle Database Appliance environments up to date and within Oracle’s supported compatibility matrix.

When legacy Database Homes remain on an ODA that has already moved to a newer operating system and appliance software stack, compatibility gaps can appear and eventully cause issues.