Oracle provides you a patches each quarter, either to fix the bugs reported or to improve performance of DB or security measure. In this blog, i will demonstrate how to apply patch to two nodes RAC of version 11.2.0.4
Download the patch from oracle support website using support id, place that patch on the oracle server and unzip that folder.
1- we have to create ocm file, it is basically a parameters file, which will be used during patch application.
Creation of OCM_FILE
/u01/app/11.2.0/grid/OPatch/ocm/bin/emocmrsp -no_banner -output /u01/app/11.2.0/grid/ocm_file.rsp

2- Login through oracle user and stop the executable used, by issuing below command:
/u01/app/oracle/product/11.2.0/bin/srvctl stop home -o /u01/app/oracle/product/11.2.0 -s /tmp/state1.txt -n racnode1

3- Stop all the RAC services on that specific node, by issued below command:
4- Once all the service are down, its the time to patch up the Grid home:
a- Apply first patch using command:
/u01/app/11.2.0/grid/OPatch/opatch napply -oh /u01/app/11.2.0/grid -local /u01/30070097/29938455 -ocmrf /u01/app/11.2.0/grid/ocm_file.rsp
b- Apply second patch:
/u01/app/11.2.0/grid/OPatch/opatch apply -oh /u01/app/11.2.0/grid -local /u01/30070097/29509309 -ocmrf /u01/app/11.2.0/grid/ocm_file.rsp
c- Apply the third patch:
/u01/app/11.2.0/grid/OPatch/opatch apply -oh /u01/app/11.2.0/grid -local /u01/30070097/29913194 -ocmrf /u01/app/11.2.0/grid/ocm_file.rsp
All three patches are successfully applied to GRID_HOME, Now we need to switch to DB_HOME to apply patches given by oracle for DB_HOME
Before application of application we need to run some preopatch command:
/u01/30070097/29938455/custom/server/29938455/custom/scripts/prepatch.sh -dbhome /u01/app/oracle/product/11.2.0
Apply first patch to DB Home:
/u01/app/oracle/product/11.2.0/OPatch/opatch napply -oh /u01/app/oracle/product/11.2.0 -local /u01/30070097/29938455/custom/server/29938455/ -ocmrf /u01/app/11.2.0/grid/ocm_file.rsp
Apply second patch to DB Home:
/u01/app/oracle/product/11.2.0/OPatch/opatch apply -oh /u01/app/oracle/product/11.2.0 -local /u01/30070097/29913194 -ocmrf /u01/app/11.2.0/grid/ocm_file.rsp
Once all patches provided are applied, we have to run postpatch command as below:
/u01/30070097/29938455/custom/server/29938455/custom/scripts/postpatch.sh -dbhome /u01/app/oracle/product/11.2.0
/u01/app/11.2.0/grid/rdbms/install/rootadd_rdbms.sh
Now starting high availiblity services:
/u01/app/11.2.0/grid/crs/install/rootcrs.pl -patch
All patches have successfully been applied to GI and Oracle home now we need to apply
Loading Modified SQL Files into the Database
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT
When it is completed now you can check the status of patches applied using patch inventory command:
/u01/app/oracle/product/11.2.0/OPatch/opatch lsinventory
Download the patch from oracle support website using support id, place that patch on the oracle server and unzip that folder.
1- we have to create ocm file, it is basically a parameters file, which will be used during patch application.
Creation of OCM_FILE
/u01/app/11.2.0/grid/OPatch/ocm/bin/emocmrsp -no_banner -output /u01/app/11.2.0/grid/ocm_file.rsp
2- Login through oracle user and stop the executable used, by issuing below command:
/u01/app/oracle/product/11.2.0/bin/srvctl stop home -o /u01/app/oracle/product/11.2.0 -s /tmp/state1.txt -n racnode1
3- Stop all the RAC services on that specific node, by issued below command:
4- Once all the service are down, its the time to patch up the Grid home:
a- Apply first patch using command:
/u01/app/11.2.0/grid/OPatch/opatch napply -oh /u01/app/11.2.0/grid -local /u01/30070097/29938455 -ocmrf /u01/app/11.2.0/grid/ocm_file.rsp
b- Apply second patch:
/u01/app/11.2.0/grid/OPatch/opatch apply -oh /u01/app/11.2.0/grid -local /u01/30070097/29509309 -ocmrf /u01/app/11.2.0/grid/ocm_file.rsp
c- Apply the third patch:
/u01/app/11.2.0/grid/OPatch/opatch apply -oh /u01/app/11.2.0/grid -local /u01/30070097/29913194 -ocmrf /u01/app/11.2.0/grid/ocm_file.rsp
All three patches are successfully applied to GRID_HOME, Now we need to switch to DB_HOME to apply patches given by oracle for DB_HOME
Before application of application we need to run some preopatch command:
/u01/30070097/29938455/custom/server/29938455/custom/scripts/prepatch.sh -dbhome /u01/app/oracle/product/11.2.0
Apply first patch to DB Home:
/u01/app/oracle/product/11.2.0/OPatch/opatch napply -oh /u01/app/oracle/product/11.2.0 -local /u01/30070097/29938455/custom/server/29938455/ -ocmrf /u01/app/11.2.0/grid/ocm_file.rsp
Apply second patch to DB Home:
/u01/app/oracle/product/11.2.0/OPatch/opatch apply -oh /u01/app/oracle/product/11.2.0 -local /u01/30070097/29913194 -ocmrf /u01/app/11.2.0/grid/ocm_file.rsp
/u01/30070097/29938455/custom/server/29938455/custom/scripts/postpatch.sh -dbhome /u01/app/oracle/product/11.2.0
Exit from Oracle User and login to root user and execute below command:
Now starting high availiblity services:
/u01/app/11.2.0/grid/crs/install/rootcrs.pl -patch
All patches have successfully been applied to GI and Oracle home now we need to apply
Loading Modified SQL Files into the Database
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT
When it is completed now you can check the status of patches applied using patch inventory command:
/u01/app/oracle/product/11.2.0/OPatch/opatch lsinventory











