Oracle sends patches each quarter or against any bug reported by end user. In this blog we will demonstrate how to deinstall or rolling back oracle patch provided by oracle on 16 Oct 2019, Patch applied to GI Home and DB Home. Execute the following on each node of the cluster in non-shared CRS and DB home environment to rollback the patch.
First of all we have to check the patch number which are applied to GI home and DB home, by issuing command:
1- $ GI_HOME/OPatch/Opatch lsinventory
It will display all the main patches, subpatches and the bugs fixed by that patch:
similarly from oracle home we should issue the same commad to check the patches number:
$ ORACLE_HOME/OPatch/opatch lsinventory
2- Stop the CRS managed resources running from DB homes.
$ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location> -n <node name>
$ /u01/app/11.2.0/grid/bin/srvctl stop home -o /u01/app/11.2.0/grid -s /tmp/statedeinstall.txt -n racnode2
now check the status:
Now bring down all the services using command :
3- Run the pre root script.
If this is a GI Home, as the root user execute:
# <GI_HOME>/crs/install/rootcrs.pl -unlock
#
/u01/app/11.2.0/grid/crs/install/rootcrs.pl -unlock
4- Now rolling back the Patches :
As the GI home owner execute:
$ <GI_HOME>/OPatch/opatch rollback -local -id <OCW Components_number> -oh <GI_HOME>
$ /u01/app/11.2.0/grid/OPatch/opatch rollback -local -id 29938455 -oh /u01/app/11.2.0/grid
$ <GI_HOME>/OPatch/opatch rollback -local -id <ACFS Components_number> -oh <GI_HOME>
$/u01/app/11.2.0/grid/OPatch/opatch rollback -local -id 29509309 -oh /u01/app/11.2.0/grid
$ <GI_HOME>/OPatch/opatch rollback -local -id <DB_PSU_number> -oh <GI_HOME>
$ /u01/app/11.2.0/grid/OPatch/opatch rollback -local -id 29913194 -oh /u01/app/11.2.0/grid
-------------------------------DB Home Patches Deinstallation------------------------------------------
5- Run the pre script for DB component of the patch.
As the database home owner execute:
$ <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>/custom/scripts/prepatch.sh -dbhome <ORACLE_HOME>
$ /u01/30070097/29938455/custom/server/29938455/custom/scripts/prepatch.sh -dbhome /u01/app/oracle/product/11.2.0
-- Roll back the DB patch from the database home.
As the database home owner execute:
$ <ORACLE_HOME>/OPatch/opatch rollback -local -id <OCW Components_number> -oh <ORACLE_HOME>
$ /u01/app/oracle/product/11.2.0/OPatch/opatch rollback -local -id /u01/30070097/29938455/ -oh /u01/app/oracle/product/11.2.0
$ <ORACLE_HOME>/OPatch/opatch rollback -local -id <DB_PSU_number> -oh <ORACLE_HOME>
$/u01/app/oracle/product/11.2.0/OPatch/opatch rollback -local -id 29913194 -oh /u01/app/oracle/product/11.2.0
Now checking the Database instance status after the patches are being successfully deinstalled.
Both nodes are up & running:
Checking the GI Home for patches, check patch inventory
$ /u01/app/11.2.0/grid/OPatch/opatch lsinventory
There is no interim patch installed.
Now checking the DB home:
$ /u01/app/oracle/product/11.2.0/OPatch/opatch lsinventory
No interim patch have been installed , one done on all nodes, run Patch Post-Deinstallation Instructions for an Oracle RAC Environment, that are:
Loged in to DB:
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @catbundle_PSU_<database SID PREFIX>_ROLLBACK.sql
SQL> QUIT
In an Oracle RAC environment, the name of the rollback script will have the format catbundle_PSU_<database SID PREFIX>_ROLLBACK.sql.
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
Check the log file for any errors. The log file is found in $ORACLE_BASE/cfgtoollogs/catbundle and is named catbundle_PSU_<database SID>_ROLLBACK_<TIMESTAMP>.log where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS. If there are errors, see Known Issues.
First of all we have to check the patch number which are applied to GI home and DB home, by issuing command:
1- $ GI_HOME/OPatch/Opatch lsinventory
It will display all the main patches, subpatches and the bugs fixed by that patch:
similarly from oracle home we should issue the same commad to check the patches number:
$ ORACLE_HOME/OPatch/opatch lsinventory
2- Stop the CRS managed resources running from DB homes.
$ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location> -n <node name>
$ /u01/app/11.2.0/grid/bin/srvctl stop home -o /u01/app/11.2.0/grid -s /tmp/statedeinstall.txt -n racnode2
now check the status:
Now bring down all the services using command :
3- Run the pre root script.
If this is a GI Home, as the root user execute:
# <GI_HOME>/crs/install/rootcrs.pl -unlock
#
/u01/app/11.2.0/grid/crs/install/rootcrs.pl -unlock
4- Now rolling back the Patches :
As the GI home owner execute:
$ <GI_HOME>/OPatch/opatch rollback -local -id <OCW Components_number> -oh <GI_HOME>
$ /u01/app/11.2.0/grid/OPatch/opatch rollback -local -id 29938455 -oh /u01/app/11.2.0/grid
$ <GI_HOME>/OPatch/opatch rollback -local -id <ACFS Components_number> -oh <GI_HOME>
$/u01/app/11.2.0/grid/OPatch/opatch rollback -local -id 29509309 -oh /u01/app/11.2.0/grid
$ <GI_HOME>/OPatch/opatch rollback -local -id <DB_PSU_number> -oh <GI_HOME>
$ /u01/app/11.2.0/grid/OPatch/opatch rollback -local -id 29913194 -oh /u01/app/11.2.0/grid
-------------------------------DB Home Patches Deinstallation------------------------------------------
5- Run the pre script for DB component of the patch.
As the database home owner execute:
$ <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>/custom/scripts/prepatch.sh -dbhome <ORACLE_HOME>
$ /u01/30070097/29938455/custom/server/29938455/custom/scripts/prepatch.sh -dbhome /u01/app/oracle/product/11.2.0
-- Roll back the DB patch from the database home.
As the database home owner execute:
$ <ORACLE_HOME>/OPatch/opatch rollback -local -id <OCW Components_number> -oh <ORACLE_HOME>
$ /u01/app/oracle/product/11.2.0/OPatch/opatch rollback -local -id /u01/30070097/29938455/ -oh /u01/app/oracle/product/11.2.0
$ <ORACLE_HOME>/OPatch/opatch rollback -local -id <DB_PSU_number> -oh <ORACLE_HOME>
6- Run the post script for DB component of the patch.
As the database home owner execute:
$ <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>/custom/scripts/postpatch.sh -dbhome <ORACLE_HOME>
$/u01/30070097/29938455/custom/server/29938455/custom/scripts/postpatch.sh -dbhome /u01/app/oracle/product/11.2.0
/**************************DONE*********************************/
7. Run the post script.
As the root user execute:
# <GI_HOME>/rdbms/install/rootadd_rdbms.sh
$ /u01/app/11.2.0/grid/rdbms/install/rootadd_rdbms.sh
If this is a GI Home, as the root user execute:
# <GI_HOME>/crs/install/rootcrs.pl -patch
$ /u01/app/11.2.0/grid/crs/install/rootcrs.pl -patch
Now checking the Database instance status after the patches are being successfully deinstalled.
Both nodes are up & running:
Checking the GI Home for patches, check patch inventory
$ /u01/app/11.2.0/grid/OPatch/opatch lsinventory
There is no interim patch installed.
Now checking the DB home:
$ /u01/app/oracle/product/11.2.0/OPatch/opatch lsinventory
Loged in to DB:
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @catbundle_PSU_<database SID PREFIX>_ROLLBACK.sql
SQL> QUIT
In an Oracle RAC environment, the name of the rollback script will have the format catbundle_PSU_<database SID PREFIX>_ROLLBACK.sql.
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
Check the log file for any errors. The log file is found in $ORACLE_BASE/cfgtoollogs/catbundle and is named catbundle_PSU_<database SID>_ROLLBACK_<TIMESTAMP>.log where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS. If there are errors, see Known Issues.




















Tauseefdbablogs: Patch Deinstallaion (Gi Home And Db Home) /Rolling Back The Patch From An Oracle Rac Home Installation Manually >>>>> Download Now
ReplyDelete>>>>> Download Full
Tauseefdbablogs: Patch Deinstallaion (Gi Home And Db Home) /Rolling Back The Patch From An Oracle Rac Home Installation Manually >>>>> Download LINK
>>>>> Download Now
Tauseefdbablogs: Patch Deinstallaion (Gi Home And Db Home) /Rolling Back The Patch From An Oracle Rac Home Installation Manually >>>>> Download Full
>>>>> Download LINK df