Consolidate Oracle Homes
You can now use the EM CLI attach_home flag to merge homes of databases running from different Oracle Homes, on the same host. A second Oracle Home can be merged to a previously deployed Oracle Home if the two homes are patched with the same version of the Gold Image.
Note:
A PDB target may also be patched using an existing Container Database at a higher patch level, in this case ATTACH_CDB operation must be performed and deploy-software and deploy-CDB operations must be skipped.attach_home=true
flag and provide the Oracle Home location within the input file, where an Oracle Home with the same Gold Image version has already been deployed. This will skip the actual deployment and add the required lineage to the new Oracle Home.emcli db_software_maintenance
-performOperation
-name="Deploy Home"
-purpose="DEPLOY_DB_SOFTWARE"
-target_type=oracle_database -target_list=db1916
-normal_credential="NORMAL:SYSMAN" -privilege_credential="ROOT:SYSMAN"
-input_file="data:/scratch/deploy_OH.prop" -attach_home=true
attach_home=true
flag to execute successfully, two validations will be performed before moving Databases from Oracle Homes:
- If a user provides
attach_home=true
flag, but the deployed version does not match between Oracle Homes, the deployment will not submit and the following message will appear: A different version is deployed at the given location, you can attach to the same version of an image deployed. - If a user provides
attach_home=true
flag, for a location where there is no deployed Oracle Home using Fleet Management; the deployment will not submit and the following message will appear: You can attach to the same version of deployed home at the given location.
Reorganizing your Oracle Homes can be useful in grouping databases according to location (same host) and version (same Gold Image). By consolidating Oracle Homes using attach_home=true
flag you can simplify how patches are applied throughout an entire host, helping keep all databases up to date in the most efficient manner. Consolidating databases within a host can also help free space, once databases are merged into a common Oracle Home, empty Oracle Homes can be cleaned up using the Oracle Home cleanup EM CLI string. For more information see Cleanup Operations.