De-Install has some bugs ..and it is touching a lot of files... and we do have enough control.
More controlled way ... is to simply detach the old Oracle home... and removing the root directory.
Step 1: Set Oracle Home to Old Oracle Home ... and list all the available ORacle Homes.
[oracle@host1 product]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0.2/db_1
[oracle@host1 product]$ $ORACLE_HOME/OPatch/opatch lsinventory -all
Oracle Interim Patch Installer version 11.2.0.1.9
Copyright (c) 2011, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0.2/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0.2/db_1/oraInst.loc
OPatch version : 11.2.0.1.9
OUI version : 11.2.0.2.0
Log file location : /u01/app/oracle/product/11.2.0.2/db_1/cfgtoollogs/opatch/opatch2014-03-26_17-00-52PM.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.0.2/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-03-26_17-00-52PM.txt
--------------------------------------------------------------------------------
List of Oracle Homes:
Name Location
OraDb11g_home2 /u01/app/oracle/product/11.2.0.2/db_1 ---- This is the Old home in the inventory… We need to remove this from the Central Inventory
agent12g1 /u01/app/oracle/agent11g/core/12.1.0.1.0
sbin12g1 /u01/app/oracle/agent11g/sbin
Ora11g_gridinfrahome1 /u01/app/11.2.0.3/grid
OraDb11g_home1 /u01/app/oracle/product/11.2.0.3/db_1
agent11g1 /u01/app/oracle/agent11g/agent11g
agent11g2 /u01/app/oracle/OEM11G/Middleware/agent11g
common11g2 /u01/app/oracle/OEM11G/Middleware/oracle_common
webtier11g2 /u01/app/oracle/OEM11G/Middleware/Oracle_WT
There are no Interim patches installed in this Oracle Home.
Rac system comprising of multiple nodes
Local node = host1
Remote node = host2
Remote node = host3
--------------------------------------------------------------------------------
OPatch succeeded.
Step 2 : Detach the home that we want to remove from the system.
[oracle@host1 product]$ $ORACLE_HOME/oui/bin/runInstaller -detachHome -silent ORACLE_HOME=/u01/app/oracle/product/11.2.0.2/db_1
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 65535 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'DetachHome' was successful.
Step 3: Double Check if the home still exists in the inventory.
--------------------------------------------------------------------------------
List of Oracle Homes:
Name Location
agent12g1 /u01/app/oracle/agent11g/core/12.1.0.1.0
sbin12g1 /u01/app/oracle/agent11g/sbin
Ora11g_gridinfrahome1 /u01/app/11.2.0.3/grid
OraDb11g_home1 /u01/app/oracle/product/11.2.0.3/db_1
agent11g1 /u01/app/oracle/agent11g/agent11g
agent11g2 /u01/app/oracle/OEM11G/Middleware/agent11g
common11g2 /u01/app/oracle/OEM11G/Middleware/oracle_common
webtier11g2 /u01/app/oracle/OEM11G/Middleware/Oracle_WT
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.3.0
There are 1 products installed in this Oracle Home.
Step 4 : You are now good to delete the Oracle home using rm –rf . Pls note that many files in GRID_HOME will be owned by root. So, its better to do it from Root user.
/bin/rm -rf $OLD_GI_HOME
Before removing the directories, I rename them to XYZ … , bounced all the services .. CRS/ASM/DBs … made sure everything is working … kind of a fool proof…
More controlled way ... is to simply detach the old Oracle home... and removing the root directory.
Step 1: Set Oracle Home to Old Oracle Home ... and list all the available ORacle Homes.
[oracle@host1 product]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0.2/db_1
[oracle@host1 product]$ $ORACLE_HOME/OPatch/opatch lsinventory -all
Oracle Interim Patch Installer version 11.2.0.1.9
Copyright (c) 2011, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0.2/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0.2/db_1/oraInst.loc
OPatch version : 11.2.0.1.9
OUI version : 11.2.0.2.0
Log file location : /u01/app/oracle/product/11.2.0.2/db_1/cfgtoollogs/opatch/opatch2014-03-26_17-00-52PM.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.0.2/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-03-26_17-00-52PM.txt
--------------------------------------------------------------------------------
List of Oracle Homes:
Name Location
OraDb11g_home2 /u01/app/oracle/product/11.2.0.2/db_1 ---- This is the Old home in the inventory… We need to remove this from the Central Inventory
agent12g1 /u01/app/oracle/agent11g/core/12.1.0.1.0
sbin12g1 /u01/app/oracle/agent11g/sbin
Ora11g_gridinfrahome1 /u01/app/11.2.0.3/grid
OraDb11g_home1 /u01/app/oracle/product/11.2.0.3/db_1
agent11g1 /u01/app/oracle/agent11g/agent11g
agent11g2 /u01/app/oracle/OEM11G/Middleware/agent11g
common11g2 /u01/app/oracle/OEM11G/Middleware/oracle_common
webtier11g2 /u01/app/oracle/OEM11G/Middleware/Oracle_WT
There are no Interim patches installed in this Oracle Home.
Rac system comprising of multiple nodes
Local node = host1
Remote node = host2
Remote node = host3
--------------------------------------------------------------------------------
OPatch succeeded.
Step 2 : Detach the home that we want to remove from the system.
[oracle@host1 product]$ $ORACLE_HOME/oui/bin/runInstaller -detachHome -silent ORACLE_HOME=/u01/app/oracle/product/11.2.0.2/db_1
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 65535 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'DetachHome' was successful.
Step 3: Double Check if the home still exists in the inventory.
--------------------------------------------------------------------------------
List of Oracle Homes:
Name Location
agent12g1 /u01/app/oracle/agent11g/core/12.1.0.1.0
sbin12g1 /u01/app/oracle/agent11g/sbin
Ora11g_gridinfrahome1 /u01/app/11.2.0.3/grid
OraDb11g_home1 /u01/app/oracle/product/11.2.0.3/db_1
agent11g1 /u01/app/oracle/agent11g/agent11g
agent11g2 /u01/app/oracle/OEM11G/Middleware/agent11g
common11g2 /u01/app/oracle/OEM11G/Middleware/oracle_common
webtier11g2 /u01/app/oracle/OEM11G/Middleware/Oracle_WT
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.3.0
There are 1 products installed in this Oracle Home.
Step 4 : You are now good to delete the Oracle home using rm –rf . Pls note that many files in GRID_HOME will be owned by root. So, its better to do it from Root user.
/bin/rm -rf $OLD_GI_HOME
Before removing the directories, I rename them to XYZ … , bounced all the services .. CRS/ASM/DBs … made sure everything is working … kind of a fool proof…
No comments:
Post a Comment