My Oracle Support Banner

EM 13c : Usage of CLEANUP_SOFTWARE Verb In Fleet Maintenance (Doc ID 2570023.1)

Last updated on NOVEMBER 20, 2024

Applies to:

Enterprise Manager for Oracle Database - Version 13.2.0.0.0 and later
Information in this document applies to any platform.

Symptoms

This Note is recommended for the following use cases only.

Case: 1
Target was not provisioned using Fleet Maintenance but installed the database software binaries using GUI.

When attempting to execute the CLEANUP_SOFTWARE command it fails with no eligible targets found for cleanup.

Command Snippet:
$ emcli db_software_maintenance -performOperation -name="cleanup" -purpose=CLEANUP_SOFTWARE -target_list='XXXXX' -target_type=oracle_database -normal_credential="SPFILE:SYSMAN" -privilege_credential="SPFILEROOT:SYSMAN" -workDir=/u01/app/tmp -reportOnly=true
Processing cleanup database software.
No eligible targets found for cleanup.
Verb performOperation completed successfully

Failed Message:
No eligible targets found for cleanup.


 Case: 2
 A: 12.2.0.1 Base version
 B: 12.2.0.1_db_190416 Version

 When Target was switched  from one version  "A"  to other version "B"  later  ROLLBACK to old version "A", We can't remove  new version Oracle Home "B".

Command Snippet:
$ emcli db_software_maintenance -performOperation -name="CLEANUP_SOFTWARE" -purpose=CLEANUP_SOFTWARE -target_list='<target_name>' -target_type='oracle_database' -normal_credential="WELCOME:SYSMAN" -privilege_credential="WELCOME-ROOT:SYSMAN" -reportOnly=true
Processing cleanup database software.
The following Oracle homes are candidate for removal by policy. However, they CANNOT BE DELETED since one or more instances are running on these Oracle homes. It is strongly recommended to update the databases to the newer version.

==================================================================================================================================
NO.    HOST                            ORACLE HOME                                    TARGET NAME                                             NO. OF ASSOCIATED TARGETS
                                                                                                       
==================================================================================================================================
1    <

Case: 3
A: 12.2.0.1 Base version
B: 12.2.0.1_db_190416 Image of 12.2.0.1_db_190416  ==> Deploy Only
C: 12.2.0.1_db_190716 Image of 12.2.0.1_db_190716  ==> Deploy and Update

When attempting to execute the CLEANUP_SOFTWARE command the Deploy Only Home 12.2.0.1_db_190416  is not listed for removal by policy.

Command Snippet:
$ emcli db_software_maintenance -performOperation -name="CLEANUP_SOFTWARE" -purpose=CLEANUP_SOFTWARE -target_type=oracle_database -target_list='<DB_Name>' -normal_credential="ORACLE:SYSMAN" -privilege_credential="ROOT:SYSMAN" -reportOnly=true
Processing cleanup database software.
The following Oracle homes are chosen for removal by policy.

==================================================================================================================================
NO.      HOST                      ORACLE HOME                             TARGET NAME                              NO. OF ASSOCIATED TARGETS
                                                                                                       
==================================================================================================================================
1      <Host_name.com>   <Oracle_Home_Path_Details>   OraDB12Home1_1_ora12201_5565.  0
        


New Deploy Only Home 12.2.0.1_db_190416  is not listed for removal policy
Orasidb12c_home1_2019_09_21_03_11_3_8474

Case: 4

User mistakenly deployed the software to different Oracle Home location

Ex:

Selected /u01/app/oracle/product/12.2_new  Oracle Home instead of /u01/app/oracle/product/12.2.0_190716.

Changes

 Oracle Home for the database was not created using Fleet EMCLI Verbs. You Can use the below query.

SQL > select target_name,target_guid from mgmt$target where target_type='oracle_home' and target_guid not in (select OH_GUID from DB_GI_OH_LINEAGE_E)
and target_name like 'Û%';

TARGET_NAME TARGET_GUID
Orasidb11g_home1_2019_07_12_03_32_39_oms.us.oracle.com_8907 65C0441A845C688F0D5FD5BF733717B9

NOTE: All the Oracle Homes listed in above query are not provisioned from Fleet.

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.