Skip to main content
ODA

ODA: Deleting Oracle Home Using ODACLI

By March 2, 2023May 3rd, 2023No Comments3 min read

To delete the oracle homes in non-oda we have deinstall.sh script but in ODA the procedure was managed by odacli. Most of the operations are now operated by odacli. To remove unnecessary oracle homes from ODA we will delete using odacli. To use the odacli utility you must have the root access, since this is owned by root user.

First, list the homes installed in the ODA machine

[root@oda-x1 ~]# odacli list-dbhomes

ID                                       Name                 DB Version                               Home Location                                 Status
---------------------------------------- -------------------- ---------------------------------------- --------------------------------------------- ----------
0e68fa05-7b74-4a9a-a562-dabf45e42c44     OraDB12102_home18    12.1.0.2.180717                          /u01/app/oracle/product/12.1.0.2/dbhome_18    Configured

Describe the home we are intended to delete.

[root@oda-x1 ~]# odacli  describe-dbhome -i  0e68fa05-7b74-4a9a-a562-dabf45e42c44

DB Home details
----------------------------------------------------------------
                     ID: 0e68fa05-7b74-4a9a-a562-dabf45e42c44
                   Name: OraDB12102_home18
                Version: 12.1.0.2.180717
          Home Location: /u01/app/oracle/product/12.1.0.2/dbhome_18
                 Status: Configured
                Created: March 27, 2021 12:07:45 PM CDT
       Database Edition: EE

[root@oda-x1 ~]#

Delete the Home using odacli

[root@oda-x1 tmp]# odacli delete-dbhome  --dbhomeid 0e68fa05-7b74-4a9a-a562-dabf45e42c44

Job details
----------------------------------------------------------------
                     ID:  178beb3d-e88d-4e25-a360-f76b42f9306c
            Description:  Database Home OraDB12102_home18 Deletion with id 0e68fa05-7b74-4a9a-a562-dabf45e42c44
                 Status:  Running
                Created:  April 6, 2021 11:11:37 AM CDT
                Message:

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Validate dbhome 0e68fa05-7b74-4a9a-a562-dabf45e42c44 for deletion April 6, 2021 11:11:37 AM CDT       April 6, 2021 11:11:37 AM CDT       Success

Validate the status of Oracle Home Deletion

[root@oda-x1 tmp]# odacli list-dbhomes

ID                                       Name                 DB Version                               Home Location                                 Status
---------------------------------------- -------------------- ---------------------------------------- --------------------------------------------- ----------
0e68fa05-7b74-4a9a-a562-dabf45e42c44     OraDB12102_home18    12.1.0.2.180717                          /u01/app/oracle/product/12.1.0.2/dbhome_20    Deleting

[root@oda-x1 tmp]#

The latest status of the list-dbhomes appeared to be as in Deleting status. Most of the operations were simplified with single tool that can do most of the operations.

Known Issues:

You may encounter issues while deleting the Oracle Home, few known issues and relevant MOS Notes for your reference

Manually delete a DBHOME when Odacli Failed to delete and left a DBHOME state as DELETING (Doc ID 2580460.1)

Delete Oracle Home On ODA Taking Very Long Time (or Hanging) (Doc ID 2564841.1)

Leave a Reply