When you patch your Oracle Grid Infrastructure 19c (GI) using the out-of-place method, you should also remove the old GI homes.
I recommend that you keep the old GI home for a while. At least until you are convinced that a rollback is not needed. Once you are comfortable with the new GI home, you can safely get rid of it.
How to Remove an Oracle Grid Infrastructure 19c Home
- I set the path to my old GI home as an environment variable:
export REMOVE_ORACLE_HOME=/u01/app/19.0.0.0/grid
- Optionally, I take a backup of the GI home for safekeeping:
export GOLDIMAGEDIR=/u01/app/grid/goldimages mkdir -p $GOLDIMAGEDIR $REMOVE_ORACLE_HOME/gridSetup.sh -createGoldImage \ -destinationLocation $GOLDIMAGEDIR \ -silent
- I verify that the GI home, is not the active one. This command returns the active GI home. It must not return the path of the GI home, which I want to delete. As grid:
$REMOVE_ORACLE_HOME/srvm/admin/getcrshome
- I double-check that the GI home to remove is not the active one. The XML tag returned must not contain an CRS=“true” attribute. As grid:
export ORA_INVENTORY_XML=/u01/app/oraInventory/ContentsXML/inventory.xml grep "$REMOVE_ORACLE_HOME" $ORA_INVENTORY_XML #This is good # <HOME NAME="OraGrid190" LOC="/u01/app/19.0.0.0/grid" TYPE="O" IDX="1"/> #This is bad #. <HOME NAME="OraGrid190" LOC="/u01/app/19.0.0.0/grid" TYPE="O" IDX="1" CRS="true"/>
- I run the deinstall tool. I switch to my home directory to ensure I am not interfering with the de-installation. As grid:
The script:cd ~ $REMOVE_ORACLE_HOME/deinstall/deinstall
- Detects the nodes in my cluster.
- Prints a summary and prompts for confirmation.
- Deinstalls the GI home on all nodes.
- Instructs me to run a script as root on all nodes.
- Prints a summary including any manual tasks in the end.
- I verify that the GI home is marked as deleted in the inventory. The XML tag should have a Removed=“T” attribute. As grid:
export ORA_INVENTORY_XML=/u01/app/oraInventory/ContentsXML/inventory.xml grep "$REMOVE_ORACLE_HOME" $ORA_INVENTORY_XML #This is good # <HOME NAME="OraGrid190" LOC="/u01/app/19.0.0.0/grid" TYPE="O" IDX="1" Removed="T"/>
- Often the deinstall tool can’t remove some files because of missing permissions. I remove the GI home manually. As root on all nodes:
export REMOVE_ORACLE_HOME=/u01/app/19.0.0.0/grid rm -rf $REMOVE_ORACLE_HOME
Silent Mode
There is also a silent mode if you want to script the removal. Check the -checkonly
and -silent
parameters in the documentation.
You can also find a sample response file in the documentation.
Appendix
Further Reading
Other Blog Posts in This Series
- Introduction
- How to Patch Oracle Grid Infrastructure 19c Using In-Place OPatchAuto
- How to Patch Oracle Grid Infrastructure 19c Using Out-Of-Place OPatchAuto
- How to Patch Oracle Grid Infrastructure 19c Using Out-Of-Place SwitchGridHome
- How to Patch Oracle Grid Infrastructure 19c and Oracle Data Guard Using Standby-First
- How to Patch Oracle Grid Infrastructure 19c Using Zero Downtime Oracle Grid Infrastructure Patching
- Which Method Should I Choose When Patching Oracle Grid Infrastructure 19c
- How to Avoid Interruptions When You Patch Oracle Grid Infrastructure 19c
- Patching Oracle Grid Infrastructure And Oracle Data Guard
- How to Clone Oracle Grid Infrastructure Home Using Golden Images
- How to Roll Back Oracle Grid Infrastructure 19c Using SwitchGridHome
- How to Remove an Old Oracle Grid Infrastructure 19c Home
- Use Cluster Verification Utility (cluvfy) and Avoid Surprises
- A Word about Zero Downtime Oracle Grid Infrastructure Patching
- Why You Need to Use Oracle Fleet Patching and Provisioning
- My Best Advice on Patching Oracle Grid Infrastructure
- Pro Tips
One thought on “How to Remove an Old Oracle Grid Infrastructure 19c Home”